How To Handle Line-breaks In Html Forms?
I have a form with a textarea and need to submit multiple lines of input to the textarea. I use : rows = [('a','b'), ('c','d')] data_set = [ '%s\n' % '|'.join(row) for row in rows
Solution 1:
I figured it out with the help of https://stackoverflow.com/users/87015/salman-a
CR
= \r
LF
= \n
And HTML forms take a line-break as CRLF
, so therefore :
\r\n
worked !
Post a Comment for "How To Handle Line-breaks In Html Forms?"