aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/js/urweb.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/js/urweb.js')
-rw-r--r--lib/js/urweb.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index fe628130..ac9e9771 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -1942,6 +1942,19 @@ function bless(s) {
}
+// Attribute name blessing
+
+function blessData(s) {
+ for (var i = 0; i < s.length; ++i) {
+ var c = s[i];
+ if (!isAlnum(c) && c != '-' && c != '_')
+ er("Disallowed character in data-* attribute name");
+ }
+
+ return s;
+}
+
+
// CSS validation
function atom(s) {