escapeHTML function
This commit is contained in:
parent
e5f2d46c6f
commit
cdd30216b1
|
@ -46,6 +46,15 @@ function t(app,text, vars){
|
||||||
}
|
}
|
||||||
t.cache={};
|
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
|
* Get the path to download a file
|
||||||
* @param file The filename
|
* @param file The filename
|
||||||
|
|
Loading…
Reference in New Issue