summaryrefslogtreecommitdiffstats
path: root/core/js/js.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/js.js')
-rw-r--r--core/js/js.js9
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('&amp;').split('<').join('&lt;').split('"').join('&quot;');
+}
+
/**
* Get the path to download a file
* @param file The filename