Bug 67916 - [test case] font tags erroneously effecting only first paragraph of text
Summary: [test case] font tags erroneously effecting only first paragraph of text
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml parsing (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 72587 73587 75272 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-11-11 18:44 UTC by David Chester
Modified: 2005-07-05 22:34 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
test case (193 bytes, text/html)
2003-11-13 17:52 UTC, Stephan Kulow
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Chester 2003-11-11 18:44:49 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:          Linux

In the following example, simply beginning a cell with a <p> tag makes the subsequent <font> tag apply to only the first paragraph, instead of to all of the text until its closing </font> tag.  If the cell is not begun with a <p> tag, the <font> tag applies to all of the text until its matching closing </font> tag, as expected. 

<table>
<tr><td width=200>
<!-- the following tag is the only difference between the two columns -->
<p>
<font face="Arial">
This text appears in Arial.
<p>
This doesn't, and it should.  Instead, this text is in the "Standard font" from
Konqueror's font configuration dialog.
</font>
</td><td width=200>
<!-- here, there's no paragraph tag like we had above -->
<font face="Arial">
This text appears in Arial.
<p>
This text appears in Arial as well, as expected.
</font>
</tr></td>
</table>

Mozilla and Opera display all text in the above example in Arial.  This bug affects many popular websites, and while some might not be bothered by it, a shame it would be if it wasn't fixed for 3.2.  This bug is not present in 3.1.4.
Comment 1 Stephan Kulow 2003-11-13 17:52:56 UTC
Created attachment 3198 [details]
test case
Comment 2 Stephan Kulow 2003-11-13 17:53:59 UTC
but you're aware that this is invalid HTML?
Comment 3 David Chester 2003-11-14 19:08:37 UTC
> but you're aware that this is invalid HTML?

I see now that the HTML is invalid.  However, I do think it's important for Konqueror to handle buggy HTML in the same manner that the currently leading browsers do.  To the end user, who is relatively unconcerned with HTML validity, this would look like a bug.

But yes, maybe "erroneously" is not warranted in the summary title of the bug, and (on the subject of the title) I also regret the misspelling of "affecting".
Comment 4 Rolf Eike Beer 2003-12-03 12:37:23 UTC
If you start to "do this like the others" you will end in another war of bug-for-bug-compatibility. This will make the engine bigger and slower and will also break valid html pages where this behaviour may be exactly the way the author wanted it.

And for that case there is a standard which describes how we should behave. We can't follow every bug a user might procude.

My opinion: => wontfix
Comment 5 Stephan Kulow 2004-01-14 13:15:00 UTC
*** Bug 72587 has been marked as a duplicate of this bug. ***
Comment 6 M 2004-01-14 13:24:26 UTC
I agree that bug compatibility races are bad, but the fact remains that lots of pages are broken in this way.  I don't want to start up the big bloat of mozilla just to look at those pages.  Would it be feasible to add configuration options to let the user select which bugs to work around?  This particular case can never be valid HTML, so IMHO it's better to treat it as the most likely intended case, rather than the closest valid HTML.  Perhaps a little icon indicating broken HTML, similar to the one for broken javascript, would be a good idea.
Comment 7 Stephan Kulow 2004-01-14 13:50:07 UTC
it's a bug and we know about it. We have tons of such work arounds
Comment 8 Stephan Kulow 2004-01-27 11:28:45 UTC
*** Bug 73587 has been marked as a duplicate of this bug. ***
Comment 9 Eugenia Loli-Queru 2004-01-27 22:18:36 UTC
I have to agree with David Chester. 
Comment 10 Stephan Kulow 2004-01-27 22:20:50 UTC
David is the reporter afaik :)
Comment 11 Eugenia Loli-Queru 2004-01-27 22:22:06 UTC
OSNews story pages have the same problem. Each long article we got from third party writers don't close the P tag and so the fonts are all get screwed up. While this is not valid HTML, the non-closing of the P is the most done error on the web.

Also, please note that Apple had the SAME bug on Safari last March 2003 and they fixed it. Now, it is 2004 and we get the same bug on Konqueror, while the previous Konqueror didn't have the problem. I believe that this should be fixed and allow Konqueror go around this buggy HTML people tend to write.
Comment 12 M 2004-01-27 22:27:45 UTC
Actually, the end tag is optional in HTML 4.01. http://www.w3.org/TR/html401/struct/text.html#h-9.3.1
Comment 13 Stephan Kulow 2004-01-28 07:25:43 UTC
If you continue reading you'll find the following: "FONT and BASEFONT are deprecated."

Yes, we will fix the problem and it's even quite high on our list, but repeating the same argument won't help here.
Comment 14 Eugenia Loli-Queru 2004-01-28 07:28:39 UTC
Yup, they are deprecated. Problem is, OSNews targets readers from a lot of cr*pped up OSes, like Amiga, BeOS, Risc OS, PDA browsers, mobile phone html browsers etc etc. These devices and OSes don't have new browsers, so it is imperative for us to offer HTML 3.2 and sometimes we go as low as HTML 2 (e.g. with the CENTER tag) just to be able to browse in these browsers... 

New CSS stuff are great, but backwards compatibility is very important too.
Comment 15 Stephan Kulow 2004-02-15 21:50:12 UTC
*** Bug 75272 has been marked as a duplicate of this bug. ***
Comment 16 Allan Sandfeld 2005-03-30 14:13:08 UTC
The residual styles from #20976 fixes some of these cases, but not all of them.
Comment 17 Allan Sandfeld 2005-07-05 22:34:06 UTC
Fixed by residual style update today.