@cocreate/utils 1.16.4 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/package.json +2 -1
- package/src/utils.js +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [1.17.0](https://github.com/CoCreate-app/CoCreate-utils/compare/v1.16.5...v1.17.0) (2022-12-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* escapeHthml function ([ef5359b](https://github.com/CoCreate-app/CoCreate-utils/commit/ef5359b511351b47803674e9ebde3532620313e1))
|
|
7
|
+
|
|
8
|
+
## [1.16.5](https://github.com/CoCreate-app/CoCreate-utils/compare/v1.16.4...v1.16.5) (2022-12-15)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add missing dev dependency style-loader ([b3553f1](https://github.com/CoCreate-app/CoCreate-utils/commit/b3553f106576deb1856e76239ed72d78ff481625))
|
|
14
|
+
|
|
1
15
|
## [1.16.4](https://github.com/CoCreate-app/CoCreate-utils/compare/v1.16.3...v1.16.4) (2022-12-13)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/utils",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"description": "A simple utils component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"utils",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"clean-webpack-plugin": "^3.0.0",
|
|
53
53
|
"file-loader": "^6.2.0",
|
|
54
54
|
"mini-css-extract-plugin": "^1.5.0",
|
|
55
|
+
"style-loader": "^3.3.1",
|
|
55
56
|
"terser-webpack-plugin": "^5.1.1",
|
|
56
57
|
"uglifyjs-webpack-plugin": "^2.2.0",
|
|
57
58
|
"webpack": "^5.24.4",
|
package/src/utils.js
CHANGED
|
@@ -138,6 +138,10 @@
|
|
|
138
138
|
else return doc.body.children[0];
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
function escapeHtml(html) {
|
|
142
|
+
return html.replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll("'", ''').replaceAll('"', '"');
|
|
143
|
+
}
|
|
144
|
+
|
|
141
145
|
function cssPath(node, container) {
|
|
142
146
|
let pathSplits = [];
|
|
143
147
|
do {
|
|
@@ -567,6 +571,7 @@
|
|
|
567
571
|
getValueFromObject,
|
|
568
572
|
domParser,
|
|
569
573
|
parseTextToHtml,
|
|
574
|
+
escapeHtml,
|
|
570
575
|
cssPath,
|
|
571
576
|
queryDocumentSelector,
|
|
572
577
|
queryDocumentSelectorAll,
|