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:10:11 +0200 |
commit | cdd30216b11c9ce2dbd2f64928b63c24ff6fe26d (patch) | |
tree | f321b876e282400e6447255659657f5fae295551 /core/js | |
parent | e5f2d46c6f7329309ec9a6048acdb3f36bcd9a21 (diff) | |
download | nextcloud-server-cdd30216b11c9ce2dbd2f64928b63c24ff6fe26d.tar.gz nextcloud-server-cdd30216b11c9ce2dbd2f64928b63c24ff6fe26d.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 d87047dbc6b..ba8020c89ed 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -46,6 +46,15 @@ function t(app,text, vars){ } 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 |