summaryrefslogtreecommitdiff
path: root/lib/js
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2010-01-01 10:49:36 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2010-01-01 10:49:36 -0500
commit66ea568ab5cd2b187a305ef6d22c8cfaf2a6c629 (patch)
treea1c114af140aee012d6f75b186cb3c4fd4e9d9d4 /lib/js
parent76a84dd3fb97b56605292c4f0eab2febe3c6a7ed (diff)
Proper client-side attrifyString
Diffstat (limited to 'lib/js')
-rw-r--r--lib/js/urweb.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index 3a0e7f9f..8d7f6e40 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -603,6 +603,10 @@ function uu(s) {
return decodeURIComponent(s.replace(new RegExp ("\\+", "g"), " "));
}
+function atr(s) {
+ return s.replace(new RegExp ("\"", "g"), "&quot;").replace(new RegExp ("&", "g"), "&amp;")
+}
+
function ub(b) {
return b ? "1" : "0";
}