mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
PHRAS-3056 #comment fix on search user #time 2h
This commit is contained in:
@@ -271,20 +271,23 @@
|
||||
|
||||
<script>
|
||||
function htmlEncode(str) {
|
||||
return str.replace(/[&"'<>]/g, function(c){
|
||||
switch (c)
|
||||
{
|
||||
case "&":
|
||||
return "&";
|
||||
case "'":
|
||||
return "'";
|
||||
case '"':
|
||||
return """;
|
||||
case "<":
|
||||
return "<";
|
||||
case ">":
|
||||
return ">";
|
||||
}
|
||||
});
|
||||
console.log(str);
|
||||
if (str != null) {
|
||||
return str.replace(/[&"'<>]/g, function (c) {
|
||||
switch (c) {
|
||||
case "&":
|
||||
return "&";
|
||||
case "'":
|
||||
return "'";
|
||||
case '"':
|
||||
return """;
|
||||
case "<":
|
||||
return "<";
|
||||
case ">":
|
||||
return ">";
|
||||
}
|
||||
});
|
||||
}
|
||||
return ;
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user