Closed Bug 760211 Opened 13 years ago Closed 2 years ago

HasAttrVal/AttrValueIs in nsHTMLEditor is not correct

Categories

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

defect

Tracking

()

RESOLVED DUPLICATE of bug 1811161

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

Will be fixed in bug 1811161.

Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1811161
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.