[PATCH] Do not trim an <option>'s text

Raphael Kubo da Costa kubito at gmail.com
Tue Mar 9 21:51:33 GMT 2010


Hey there,

I have attached a patch to fix bug 60867 [1], which is about KHTML eating 
 's inside an <option> tag.

Basically, if the tag didn't have its value attribute set, its text field was 
being used instead (in accordance to the spec). However, QString::simplified() 
was being called, which removed extra whitespace in the string.

The patch removes the code that stripped white space. The first attempt at 
stripping white space comes from commit 59342 [2], apparently in order to work 
around some problem that I believe does not exist anymore.

I have also attached a test case to make sure JavaScript also works as 
expected, but I'm not sure where to put it in khtmltests.

So is it OK to commit and backport?

Cheers,
Raphael

[1] https://bugs.kde.org/60867
[2] http://websvn.kde.org/?view=revision&revision=59342
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-bug60867.diff
Type: text/x-patch
Size: 1041 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20100309/2349617f/attachment.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20100309/2349617f/attachment.html>


More information about the kfm-devel mailing list