Bug 188910

Summary: [testcase] Strange character appearing when using empty string for 'content' property in CSS ':after' selector
Product: [Applications] konqueror Reporter: Matt Williams <matt>
Component: khtmlAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: aiacovitti, xxtjaxx
Priority: NOR Keywords: testcase
Version: 4.12.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 4.11.5
Attachments: The page that shows the bug
Screenshot of the bug
testcase

Description Matt Williams 2009-04-05 20:26:40 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

If I create a file which contains:

<html>
 <head>
  <style>
   blockquote:after { content: ""; }
  </style>
 </head>
 <body>
  <blockquote>&nbsp;</blockquote>
 </body>
</html>

when I view the page, a strange character appears when nothing should be visibly displayed.

If I set the 'blockquote:after' setting as well then the character still only appears once.

I will attach the exact HTML page and a screenshot.
Comment 1 Matt Williams 2009-04-05 20:29:26 UTC
Created attachment 32634 [details]
The page that shows the bug
Comment 2 Matt Williams 2009-04-05 20:29:58 UTC
Created attachment 32635 [details]
Screenshot of the bug
Comment 3 Matt Williams 2009-04-05 20:31:14 UTC
I first noticed the bug in the page http://news.cnet.com/8301-13505_3-10211388-16.html where the character appears at the end of the quote "... support on all platforms."
Comment 4 Andreas Marschke 2009-06-20 18:06:02 UTC
Seems like a charset issue check which fopnst you have installed or which you are using
Comment 5 Andrea Iacovitti 2012-03-10 22:05:37 UTC
Confirmed in kde 4.7.4 version
Comment 6 Andrea Iacovitti 2013-12-20 17:49:03 UTC
Created attachment 84201 [details]
testcase
Comment 7 Andrea Iacovitti 2013-12-22 18:17:35 UTC
Git commit e71c6b7b97c80afa284b854734b0a7d35868e093 by Andrea Iacovitti.
Committed on 22/12/2013 at 17:38.
Pushed by aiacovitti into branch 'KDE/4.11'.

Also check for a non zero length text here.
The QChar* pointer could be not null but pointing to the single char '\0'
due to how DOMStringImpl is implemented.
FIXED-IN: 4.11.5

M  +5    -2    khtml/rendering/font.cpp
M  +1    -1    khtml/rendering/font.h

http://commits.kde.org/kdelibs/e71c6b7b97c80afa284b854734b0a7d35868e093
Comment 8 Andrea Iacovitti 2014-01-09 19:49:44 UTC
Git commit 18649ca33005a8af0086eab34dc94ae1dedf7028 by Andrea Iacovitti.
Committed on 09/01/2014 at 19:46.
Pushed by aiacovitti into branch 'master'.

Also check for a non zero length text here.
The QChar* pointer could be not null but pointing to the single char '\0'
due to how DOMStringImpl is implemented.
FIXED-IN: 4.11.5

(Forward-port kdelibs commit e71c6b7b97c80afa284b854734b0a7d35868e093)

M  +3    -3    src/rendering/font.cpp
M  +1    -1    src/rendering/font.h

http://commits.kde.org/khtml/18649ca33005a8af0086eab34dc94ae1dedf7028