diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2012-10-12 14:01:47 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2012-10-12 14:04:09 +0200 |
commit | 1960067926b5928a2023d819bcf504e4c0057e23 (patch) | |
tree | 80d2399a76253b59c1acd8435565841f2c72e697 /core/js | |
parent | 33bd9ecd9d5196d2209d52a4c96e65fce4edee7e (diff) | |
download | nextcloud-server-1960067926b5928a2023d819bcf504e4c0057e23.tar.gz nextcloud-server-1960067926b5928a2023d819bcf504e4c0057e23.zip |
escapeHTML function
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/js.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/js/js.js b/core/js/js.js index 657dd6d6f8a..9a7da67e71f 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -30,6 +30,15 @@ function t(app,text){ } t.cache={}; +/* +* Sanitizes a HTML string +* @param string +* @return Sanitized string +*/ +function escapeHTML(s) { + return s.toString().split('&').join('&').split('<').join('<').split('"').join('"'); +} + /** * Get the path to download a file * @param file The filename |