Mercurial > urweb
diff lib/js/urweb.js @ 1108:82ac88b4e0a7
Proper client-side attrifyString
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Fri, 01 Jan 2010 10:49:36 -0500 |
parents | 118ab9641a64 |
children | e1d738870086 |
line wrap: on
line diff
--- a/lib/js/urweb.js Thu Dec 31 18:07:53 2009 -0500 +++ b/lib/js/urweb.js Fri Jan 01 10:49:36 2010 -0500 @@ -603,6 +603,10 @@ return decodeURIComponent(s.replace(new RegExp ("\\+", "g"), " ")); } +function atr(s) { + return s.replace(new RegExp ("\"", "g"), """).replace(new RegExp ("&", "g"), "&") +} + function ub(b) { return b ? "1" : "0"; }