projects
/
blerg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add new account center and account recovery frontends
[blerg.git]
/
www
/
jssrc
/
blerg
/
Util.js
diff --git
a/www/jssrc/blerg/Util.js
b/www/jssrc/blerg/Util.js
index
8706f81
..
6e99f46
100644
(file)
--- a/
www/jssrc/blerg/Util.js
+++ b/
www/jssrc/blerg/Util.js
@@
-77,6
+77,8
@@
blerg.Util.blergFormat = function(text) {
out.push('<p>');
githubCodeMode = false;
} else {
out.push('<p>');
githubCodeMode = false;
} else {
+ // Sanitize HTML input
+ l = l.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
out.push(l + "\n");
}
return;
out.push(l + "\n");
}
return;
@@
-94,6
+96,8
@@
blerg.Util.blergFormat = function(text) {
out.push('<pre>');
codeMode = true;
}
out.push('<pre>');
codeMode = true;
}
+ // Sanitize HTML input
+ l = l.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
out.push(l.substr(4) + "\n");
return;
} else {
out.push(l.substr(4) + "\n");
return;
} else {