rasti 4.1.1-alpha.0 → 4.1.1
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/README.md +2 -2
- package/dist/rasti.js +7 -4
- package/dist/rasti.js.map +1 -1
- package/dist/rasti.min.js +1 -1
- package/dist/rasti.min.js.map +1 -1
- package/es/utils/getAttributesHTML.js +7 -4
- package/es/utils/getAttributesHTML.js.map +1 -1
- package/lib/utils/getAttributesHTML.cjs +7 -4
- package/lib/utils/getAttributesHTML.cjs.map +1 -1
- package/package.json +1 -1
- package/src/utils/getAttributesHTML.js +7 -4
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<picture>
|
|
3
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/8tentaculos/rasti@v4.1.1
|
|
4
|
-
<img alt="Rasti.js" src="https://cdn.jsdelivr.net/gh/8tentaculos/rasti@v4.1.1
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/8tentaculos/rasti@v4.1.1/docs/logo-dark.svg">
|
|
4
|
+
<img alt="Rasti.js" src="https://cdn.jsdelivr.net/gh/8tentaculos/rasti@v4.1.1/docs/logo.svg" height="120">
|
|
5
5
|
</picture>
|
|
6
6
|
</p>
|
|
7
7
|
|
package/dist/rasti.js
CHANGED
|
@@ -1711,12 +1711,15 @@
|
|
|
1711
1711
|
}
|
|
1712
1712
|
|
|
1713
1713
|
/**
|
|
1714
|
-
*
|
|
1715
|
-
*
|
|
1714
|
+
* Match a name that is legal for an HTML attribute. Excludes whitespace, quotes,
|
|
1715
|
+
* `>`, `/`, `=` and control characters, which would otherwise end the attribute
|
|
1716
|
+
* or the tag when the name is interpolated into markup. An empty name is excluded
|
|
1717
|
+
* as well, since it can't be serialized as a name.
|
|
1716
1718
|
* @type {RegExp}
|
|
1717
1719
|
* @private
|
|
1718
1720
|
*/
|
|
1719
|
-
|
|
1721
|
+
// eslint-disable-next-line no-control-regex
|
|
1722
|
+
const VALID_ATTRIBUTE_NAME = /^[^\s"'>/=\u0000-\u001F\u007F-\u009F]+$/;
|
|
1720
1723
|
|
|
1721
1724
|
/**
|
|
1722
1725
|
* Escape an attribute value. Values are serialized inside double quotes,
|
|
@@ -1740,7 +1743,7 @@
|
|
|
1740
1743
|
Object.keys(attributes).forEach(key => {
|
|
1741
1744
|
let value = attributes[key];
|
|
1742
1745
|
// Skip invalid names, they can't be serialized as an attribute.
|
|
1743
|
-
if (
|
|
1746
|
+
if (!VALID_ATTRIBUTE_NAME.test(key)) return;
|
|
1744
1747
|
|
|
1745
1748
|
if (value === true) {
|
|
1746
1749
|
html.push(key);
|