Bug 4560 - Markup in <title> prevents decoder from looking for a charset
Summary: Markup in <title> prevents decoder from looking for a charset
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 420+
Hardware: Mac All
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-21 12:38 PDT by Alexey Proskuryakov
Modified: 2005-09-01 09:13 PDT (History)
0 users

See Also:


Attachments
Test case (494 bytes, text/html)
2005-08-21 12:39 PDT, Alexey Proskuryakov
no flags Details
Proposed patch (1.77 KB, patch)
2005-08-21 12:44 PDT, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2005-08-21 12:38:57 PDT
Currently, Decoder::decode() stops looking for a charset definition as soon as it sees a tag forbidden in 
<title>. However, it sometimes happens that HTML markup gets into <title>. Other parts of WebKit 
handle tags in <title> correctly, so it's only Decoder that doesn't like this.

Firefox handles such pages just fine.
Comment 1 Alexey Proskuryakov 2005-08-21 12:39:24 PDT
Created attachment 3493 [details]
Test case
Comment 2 Alexey Proskuryakov 2005-08-21 12:44:04 PDT
Created attachment 3494 [details]
Proposed patch
Comment 3 Darin Adler 2005-08-21 15:20:52 PDT
Comment on attachment 3494 [details]
Proposed patch

I would call the variable just "inTitle" rather than "areInTitle", but
otherwise looks good. r=me
Comment 4 Alexey Proskuryakov 2005-08-21 21:43:27 PDT
The reason why I didn't call it "inTitle" is that "in", "out" and "io" are prefixes widely used in Mac OS APIs 
to distinguish input and output parameters.
Comment 5 Darin Adler 2005-08-31 01:09:56 PDT
Understood, but I don't think that convention is relevant in a large cross-platform code base that never 
uses that convention at all.
Comment 6 Darin Adler 2005-08-31 01:16:51 PDT
Maybe withinTitle would be best.

(Sorry I didn't land this earlier. It was marked UNCONFIRMED so it was not showing up in my query.)
Comment 7 Alexey Proskuryakov 2005-08-31 01:19:59 PDT
Sure, I really have no problem with most coding conventions :) And withinTitle looks like the best variant.

Would you like me to update the patch?
Comment 8 Darin Adler 2005-08-31 10:25:13 PDT
It's would be fine, but I can also just update the name when landing the patch.