Open Bug 651886 Opened 14 years ago Updated 3 years ago

nsAString::LowercaseEqualsLiteral doesn't do what its dom/layout consumers think it does

Categories

(Core :: XPCOM, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: bzbarsky, Unassigned)

Details

In particular, if the nsAString contains KELVIN SIGN that will test equal to 'k' and if it contains LATIN CAPITAL LETTER I WITH DOT ABOVE that will test equal to 'i'. My temptation is to change LowercaseEqualsLiteral to not do that. Alternately, we need to switch a bunch of callers off it to some new nsContentUtils API (or nsContentUtils::EqualsIgnoreASCIICase, but that's just a pain to use).
Yeah, I'd ideally like to switch this function to only lowercase ascii characters. That seems to be the least surprising and most performant solution. Do we have any callers that actually want the current behavior? Though of course, ideally the name should be tweaked to make this more clear too :(
Fwiw, the current name implied the ascii-only behavior to me, at least...
Component: String → XPCOM
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.