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