Bug 120251 - Newlines in hidden input values are converted to spaces.
Summary: Newlines in hidden input values are converted to spaces.
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: khtml forms (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-16 17:31 UTC by Leon Bottou
Modified: 2006-02-23 19:05 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test case: Konqui result (39.74 KB, image/png)
2006-01-17 16:37 UTC, Leon Bottou
Details
Test case: Firefox result (32.49 KB, image/png)
2006-01-17 16:39 UTC, Leon Bottou
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leon Bottou 2006-01-16 17:31:39 UTC
Version:            (using KDE KDE 3.4.3)
Installed from:    Ubuntu Packages
Compiler:          gcc-4.0.2 kubuntu packages
OS:                Linux

When the value of a tags <input type=hidden ... />
contains several lines, konqui converts the newlines
into spaces before posting the data.

This causes problems for various wiki applications.
For instance Dokuwiki does section editing by passing
the page text in three parts.  The editable part is 
passed in a <textarea></textarea>, and the non editable 
parts are passed in a <input type=hidden value='xxx'> field.
The thing breaks because khtml looses the newlines in the
non editable parts.

TEST CASE:  http://leon.bottou.com/x.html.
Compare the konqui answer with the firefox answer.
Comment 1 Nicolas Goutte 2006-01-17 10:17:17 UTC
I cannot reproduce. For me the test page works.
Comment 2 Leon Bottou 2006-01-17 16:37:47 UTC
Created attachment 14289 [details]
Test case: Konqui result

This is what konqui (kubuntu, kde-3.4.3) returns after pressing submit.
Notice the text "this was a three line hidden text" displayed
on a single line.
Comment 3 Leon Bottou 2006-01-17 16:39:12 UTC
Created attachment 14290 [details]
Test case: Firefox result

This is the firefox result.
Notice that the line "this was<br>a three line<br>hidden text"
now has the newlines where we expect them.
Comment 4 Maksim Orlovich 2006-01-17 16:44:09 UTC
Works fine for me with 3.5 branch...
Comment 5 Leon Bottou 2006-01-17 16:44:23 UTC
Three possibilities:
1- my test case was not explicit enough.
2- this is a kde-3.4.3 things that is gone now.
3- this is a kubuntu specific thing

I just attached screendumps of the konqui-3.4.3 
and firefox-1.7 output on my machine.
Notice that konqui looses the newlines.

If you cannot reproduce on your setup, 
I will simply post to the ubuntu bugs database
with a pointer to this page.

Thanks.

- Leon Bottou
Comment 6 Maksim Orlovich 2006-02-23 19:05:55 UTC
Can't reproduce on dpkg-installed 3.5.1 under Kubuntu breezy either