mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 784386 - Part 2: Replace innerHTML call for <font> to <span> conversion. r=lucasr
This commit is contained in:
parent
b4de1179b8
commit
f41e02d9b9
@ -216,7 +216,10 @@ Readability.prototype = {
|
||||
|
||||
this._replaceBrs(doc.body);
|
||||
|
||||
doc.body.innerHTML = doc.body.innerHTML.replace(this.REGEXPS.replaceFonts, '<$1span>');
|
||||
let fonts = doc.getElementsByTagName("FONT");
|
||||
for (let i = fonts.length; --i >=0;) {
|
||||
this._setNodeTag(fonts[i], "SPAN");
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
@ -290,6 +293,11 @@ Readability.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
_setNodeTag: function (node, tag) {
|
||||
node.localName = tag.toLowerCase();
|
||||
node.tagName = tag.toUpperCase();
|
||||
},
|
||||
|
||||
/**
|
||||
* Prepare the article node for display. Clean out any inline styles,
|
||||
* iframes, forms, strip extraneous <p> tags, etc.
|
||||
|
Loading…
Reference in New Issue
Block a user