Bug 4560

Summary: Markup in <title> prevents decoder from looking for a charset
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: Layout and RenderingAssignee: Darin Adler <darin>
Status: VERIFIED FIXED    
Severity: Normal    
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: All   
Attachments:
Description Flags
Test case
none
Proposed patch darin: review+

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.