summaryrefslogtreecommitdiff
path: root/lib/js/urweb.js
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2014-05-02 15:32:10 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2014-05-02 15:32:10 -0400
commit4e164132ec8a73a440c2299126fc11c2275d439b (patch)
treee35283c198e93ed20c6a38a6d01361630a6b0771 /lib/js/urweb.js
parent0254362f5b743d4c5abc02d3e375387e5ef1394a (diff)
HTML5 data-* attributes
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) {