Closed Bug 547850 Opened 15 years ago Closed 15 years ago

HTML methods should only case-fold ASCII characters

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sicking, Assigned: sicking)

References

Details

Attachments

(1 file)

A number of HTML methods do case folding in order to act case insensitive. However we should only case fold a-z. Characters like Å should not be converter to å (or the other way around). Patch with testcase coming up.
Attachment #428404 - Attachment is patch: true
Attachment #428404 - Attachment mime type: application/octet-stream → text/plain
Comment on attachment 428404 [details] [diff] [review] Patch to fix > /* static */ > void >+nsContentUtils::ASCIIToLower(const nsAString& aSource, nsAString& aDest) >+{ >+ PRUint32 len = aSource.Length(); >+ aDest.SetLength(len); >+ if (aDest.Length() == len) { I guess the failure mode behavior here might not make it obvious why getFoo failed, but I guess the solution is good enough while waiting for the infallible malloc. Looks good to me, although I'm not supposed to be qualified to r anything.
Attachment #428404 - Flags: review?(hsivonen) → review+
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: