Re: stripped \n

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/20/2013 10:16 AM, John Taylor-Johnston wrote:
Hi,
I have a <textarea> when submitted creates a new form with the textarea
data in a hidden field:

<input name="DPRnarration" type="text" hidden form="DPRform"
value="Enter call

narration here.">

But when this new form gets resubmitted, the \n get stripped?

<input name="DPRnarration" type="text" hidden form="DPRform"
value="Enter callnarration here.">

I don't get it.

There is nothing in my code that is stripping the \n?

<input name="DPRnarration" type="text" hidden form="DPRform"
value="<?php echo stripslashes($_POST["DPRnarration"]);?>">

Do I need to put it in another textarea and declare it hidden?


Here is a quote:

If the element is mutable, its value should be editable by the user. User agents must not allow users to insert "LF" (U+000A) or "CR" (U+000D) characters into the element's value.


I found it on this page:

http://www.w3.org/TR/html5/forms.html#text-%28type=text%29-state-and-search-state-%28type=search%29

Does that explain why your example doesn't work?

--
Jim Lucas

http://www.cmsws.com/
http://www.cmsws.com/examples/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux