mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1108382 - Part 2: Do not use non-standard flag argument of String.prototype.match/replace in browser/components/translation/. r=felipe
This commit is contained in:
parent
fe0f61d6b1
commit
bfb908ee6f
@ -207,7 +207,7 @@ this.BingTranslator.prototype = {
|
||||
if (root.isSimpleRoot) {
|
||||
// Workaround for Bing's service problem in which "&" chars in
|
||||
// plain-text TranslationItems are double-escaped.
|
||||
result = result.replace("&", "&", "g");
|
||||
result = result.replace(/&/g, "&");
|
||||
}
|
||||
|
||||
root.parseResult(result);
|
||||
@ -422,11 +422,11 @@ let BingTokenManager = {
|
||||
*/
|
||||
function escapeXML(aStr) {
|
||||
return aStr.toString()
|
||||
.replace("&", "&", "g")
|
||||
.replace('"', """, "g")
|
||||
.replace("'", "'", "g")
|
||||
.replace("<", "<", "g")
|
||||
.replace(">", ">", "g");
|
||||
.replace(/&/g, "&")
|
||||
.replace(/\"/g, """)
|
||||
.replace(/\'/g, "'")
|
||||
.replace(/</g, "<")
|
||||
.replace(/>/g, ">");
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user