Bug 93035 - khtml incorrectly renders tab characters (konqueror and Safari)
Summary: khtml incorrectly renders tab characters (konqueror and Safari)
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml parsing (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-10 15:30 UTC by theosib
Modified: 2005-03-21 20:20 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description theosib 2004-11-10 15:30:10 UTC
Version:            (using KDE KDE 3.3.1)
Installed from:    Gentoo Packages
Compiler:          N/A 
OS:                Linux

Look at the source code in thit article page:

http://www.troubleshooters.com/codecorn/primenumbers/primenumbers.htm

In mozilla, the it's formatted correctly.  In konqueror, the indenting of the code is completely random.  It appears that Safari users are having exactly the same problem with this page.

My best guess as to the cause is that there are tab characters embedded in the text, and khtml doesn't like them.
Comment 1 Stephan Kulow 2004-11-10 15:36:58 UTC
very possible
Comment 2 Allan Sandfeld 2005-03-21 20:20:41 UTC
CVS commit by carewolf: 

Fix stupid mixing of PRE, BR and tabulators.
BUG: 93035


  M +3 -1      ChangeLog   1.407
  M +3 -0      html/htmltokenizer.cpp   1.300


--- kdelibs/khtml/ChangeLog  #1.406:1.407
@@ -1,5 +1,7 @@
 2005-03-21  Allan Sandfeld Jensen <kde@carewolf.com>
 
-        * html/htmltokenizer.cpp: Only skip first LF if immediately after PRE tag
+        * html/htmltokenizer.cpp:
+            - Only skip first LF if immediately after PRE tag.
+            - Set prePos to 0 after BR tag
 
 2005-03-18  Allan Sandfeld Jensen <kde@carewolf.com>

--- kdelibs/khtml/html/htmltokenizer.cpp  #1.299:1.300
@@ -1139,4 +1139,7 @@ void HTMLTokenizer::parseTag(TokenizerSt
                 discard = AllDiscard;
                 break;
+            case ID_BR:
+                prePos = 0;
+                break;
             case ID_SCRIPT:
                 if (beginTag) {