[Webkit-unassigned] [Bug 39801] REGRESSION (r45962): Pasted newlines are stripped on form submit at paste.nerv.fi
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jun 4 00:13:26 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=39801
--- Comment #12 from Shinichiro Hamaji <hamaji at chromium.org> 2010-06-04 00:13:26 PST ---
Sorry for the latency and thanks for investigations.
It's unfortunate we break fast/forms/basic-textareas with Ojan's patch. This means the hixie's test will fail again, right?
http://www.hixie.ch/tests/evil/mixed/wraptextarea.html
I've uploaded a patch with another approach and I'm guessing this approach is better for this issue, but I'm not sure. I should admit I'm not good at editing stuff.
With my patch, RenderTextControl::text() and RenderTextControl::textWithHardLineBreaks() inserts newlines when we find </div>. In this way we can preserve newlines when we submit a form.
We might be able to fix this issue by modifying createFragmentFromText so it doesn't emit <div> anymore and uses <br> instead. I didn't choose this way because I guessed we may emit <div> in future for another purpose.
By the way, I've noticed a similar issue when I'm creating this patch. If we input "foo bar" into nowrap textarea and submit it, the expected query string is "foo+++bar" but the actual value was "foo+%A0+bar" (%A0 is NBSP). I think we can easily fix this issue by translating a NBSP into a space in RenderTextControl::text(). If we decide to go with my approach, I'll file another bug and fix it soon later.
Ojan, what do you think? Are there any big issues with my approach? Thanks!
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list