mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 11:47:54 +01:00
clipper(core): escape % & ' during css stringify
This commit is contained in:
committed by
Abdullah Atta
parent
9c9582ae12
commit
899e56e9cd
@@ -29,7 +29,8 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"test": "playwright test"
|
||||
"test": "playwright test",
|
||||
"postinstall": "patch-package"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/streetwriters/notesnook/issues"
|
||||
|
||||
24
packages/clipper/patches/css-what+6.1.0.patch
Normal file
24
packages/clipper/patches/css-what+6.1.0.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
diff --git a/node_modules/css-what/lib/commonjs/stringify.js b/node_modules/css-what/lib/commonjs/stringify.js
|
||||
index 158b180..89b5b6c 100644
|
||||
--- a/node_modules/css-what/lib/commonjs/stringify.js
|
||||
+++ b/node_modules/css-what/lib/commonjs/stringify.js
|
||||
@@ -11,7 +11,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.stringify = void 0;
|
||||
var types_1 = require("./types");
|
||||
-var attribValChars = ["\\", '"'];
|
||||
+var attribValChars = ["\\", '"', "%", "'"];
|
||||
var pseudoValChars = __spreadArray(__spreadArray([], attribValChars, true), ["(", ")"], false);
|
||||
var charsToEscapeInAttributeValue = new Set(attribValChars.map(function (c) { return c.charCodeAt(0); }));
|
||||
var charsToEscapeInPseudoValue = new Set(pseudoValChars.map(function (c) { return c.charCodeAt(0); }));
|
||||
diff --git a/node_modules/css-what/lib/es/stringify.js b/node_modules/css-what/lib/es/stringify.js
|
||||
index 5f3b8ef..0ec34f7 100644
|
||||
--- a/node_modules/css-what/lib/es/stringify.js
|
||||
+++ b/node_modules/css-what/lib/es/stringify.js
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SelectorType, AttributeAction } from "./types";
|
||||
-const attribValChars = ["\\", '"'];
|
||||
+const attribValChars = ["\\", '"', "%", "'"];
|
||||
const pseudoValChars = [...attribValChars, "(", ")"];
|
||||
const charsToEscapeInAttributeValue = new Set(attribValChars.map((c) => c.charCodeAt(0)));
|
||||
const charsToEscapeInPseudoValue = new Set(pseudoValChars.map((c) => c.charCodeAt(0)));
|
||||
Reference in New Issue
Block a user