Open Bug 760211 Opened 10 years ago Updated 10 months ago

HasAttrVal/AttrValueIs in nsHTMLEditor is not correct

Categories

(Core :: DOM: Editor, defect, P5)

defect

Tracking

()

People

(Reporter: ayg, Unassigned)

References

Details

Code in nsHTMLEditor (currently including at least SetInlinePropertyOnTextNode and SetInlinePropertyOnNodeImpl) checks whether inline HTML style is present by literally checking the attribute value, case-insensitively, using nsHTMLEditor::HasAttrVal, which calls nsIContent::AttrValueIs.  This is wrong in some cases, if the attribute we're checking for has the same meaning but different form.  For instance, <font color=red> will return false from HasAttrVal(fontElem, NS_LITERAL_STRING("color"), NS_LITERAL_STRING("#ff0000")).  We should do the check intelligently, based on the attribute we're checking.

Bulk-downgrade of unassigned, >=3 years untouched DOM/Storage bug's priority.

If you have reason to believe this is wrong, please write a comment and ni :jstutte.

Severity: minor → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.