Add backtick to HTML escape code
Internet Explorer treats a backtick (`) as an attribute delimiter like " and '. Account for this in HTML escape code. Change-Id: I48bccc0013829662479ce321a34f5c69e48aca95
This commit is contained in:
@@ -30,11 +30,12 @@ util.htmlEntityMap = {
|
|||||||
'>': '>',
|
'>': '>',
|
||||||
'"': '"',
|
'"': '"',
|
||||||
'\'': ''',
|
'\'': ''',
|
||||||
'/': '/'
|
'/': '/',
|
||||||
|
'`': '`',
|
||||||
};
|
};
|
||||||
|
|
||||||
util.escapeHTML = function(str) {
|
util.escapeHTML = function(str) {
|
||||||
return str.replace(/[&<>"'\/]/g, function(s) {
|
return str.replace(/[&<>"'`\/]/g, function(s) {
|
||||||
return util.htmlEntityMap[s];
|
return util.htmlEntityMap[s];
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user