mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-02-04 11:04:29 +00:00
& should be reversed last (to correctly transform "&lt;" to "<" and not to "<")
This commit is contained in:
parent
6ca9151eb2
commit
cd06996b62
@ -342,10 +342,10 @@ function escapeHtmlEntities(str) {
|
||||
|
||||
function reverseHtmlEntities(str) {
|
||||
return str
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, "'");
|
||||
.replace(/'/g, "'")
|
||||
.replace(/&/g, '&');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user