escapeHTML function
This commit is contained in:
parent
e5f2d46c6f
commit
cdd30216b1
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue