Bug 147703

Summary: fails to render embedded rtl html tags correctly
Product: [Applications] konqueror Reporter: Olivier Vitrat <ovit.debian>
Component: generalAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed In:

Description Olivier Vitrat 2007-07-09 16:19:44 UTC
Version:            (using KDE KDE 3.5.6)
Installed from:    Debian stable Packages

Reported in Debian BTS at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=359680

Konqueror (although I suspect KHTML is the problem as the same thing
occurs in Quanta) fails to render embedded rtl html properly.
if the follwoing string is split into separate elements and some are
given a dir of "rtl", then the rendered string results in character
order within words being reversed.

first second third fourth fifth sixth

with every other word having a dir of rtl, is rendered as 

sixth htfif fourth driht second first

as you can see the first word is rendered correctly the subsequent rtl
ones are reversed.

Example html code follows
<html>
<head><title>test page</title></head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<body>
<div id="list_table">
<h4>The line below should read "first second third fourth fifth sixth"
on the right of the page</h4>
<div dir="rtl">
<span>first</span> second <span>third</span> fourth <span>fifth</span>
sixth
</div>
<h4>The line below should read "sixth fifth fourth third second first" on
the right of the page</h4>
<div dir="rtl">
<span dir="rtl">first</span> second <span dir="rtl">third</span> fourth
<span dir="rtl">fifth</span> sixth
</div>
<h4>The line below should read "first second third fourth fifth sixth"
on the left	of the page</h4>
<div dir="ltr">
<span dir="ltr">first</span> second <span dir="ltr">third</span> fourth
<span dir="ltr">fifth</span> sixth
</div>
</div>
</body>
</html>

sample html ends.

Other browsers - Opera, Firefox, Sea Monkey and Internet Explorer 6,
render this correctly
Comment 1 Diego Iastrubni 2007-12-14 12:01:01 UTC
I can confirm this for KHTML3, but in KHTML4 it's working perfectly. Closing as IMHO this is a QPainter bug in Qt3.

"Please upgrade" :)