mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-04 20:04:45 +00:00
XML entities should be escaped globally!
This commit is contained in:
parent
bb389e4723
commit
a64ae3d9eb
1 changed files with 5 additions and 5 deletions
|
|
@ -37,11 +37,11 @@ function capitalize(string) {
|
|||
}
|
||||
|
||||
function escapeXml(string) {
|
||||
return string.replace('&', '&')
|
||||
.replace('"', '"')
|
||||
.replace("'", ''')
|
||||
.replace("<", '<')
|
||||
.replace(">", '>');
|
||||
return string.replace(/&/g, '&')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
}
|
||||
|
||||
/** @namespace */
|
||||
|
|
|
|||
Loading…
Reference in a new issue