Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7015485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:39:29+00:00 2026-05-27T22:39:29+00:00

I’ve faced a really weird behaviour of textarea today. Have been bugfixing it for

  • 0

I’ve faced a really weird behaviour of textarea today. Have been bugfixing it for the whole day, and I still cannot find the solution. Would appreciate any help, so thanks in advance.

I’m creating a GAE-python app.
And I have this little form here:

<form action="/add" method="post">
<div><textarea name="Name" rows="1" cols="60">name</textarea></div>
<div><textarea name="Email" rows="1" cols="60">email</textarea></div>
<div><textarea name="Comments" rows="6" cols="60">comments</textarea></div>
<div><input type="submit" value="Post"></div>
</form>

And I’m sending data (“comments” field) via POST-request to python script.
But…
Somehow I always get double line-breaks, or double CrLf, in the end which are stored in the database.
But strangely when I debug the request there’s something weird (both in FireFox+Firebug, and Chrome+DevTools).

For example I write and send this comments content via textarea:
c
c
c

In the url-encrypted data I see c%0D%0Ac%0D%0Ac
So it must be cCrLfcCrLfc
But when I copy the not-encrypted var from FireBug(DevTools) to NotePad++, it shows me this:

c CRLF
CRLF
c CRLF
CRLF
c CRLF
CRLF

Why is it doubled in the decoded format?!
And of course when I print the result back from Database to Browser I get all those double break-lines.
(when I look at this TextProperty of the Entity via “Datastore Viewer”, it is written just as “c c c”).

One more thing:
I’m having a flash app which sends post-requests to the same python-script, and all line-breaks made in flash’s textboxs are written correctly.
But if I just try to open that database entity via textarea in browser-s interface and just save it (without editing) I receive all line-breaks doubled again.

Is there any fixes of that?

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:39:30+00:00Added an answer on May 27, 2026 at 10:39 pm

    By the specifications, and in browser practice, a newline in user input in textarea as transmitted a CR LF pair, %-encoded as %0D%0A. Most probably this is what your server-side script gets, though you could verify this by dumping out the raw data it gets. What happens then is up to your script and its interaction with the database.

    There are varying newline conventions in different operating systems and programs, the most common being CR alone, LF alone, and CR LF pair, and the last one is the Internet practice. So it seems probable that some software component(s) then interpret CR LF as two separate control characters, each of which indicates a line break, and at some later point each of these is canonicalized to CR LF (or something that looks like CR LF).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Seemingly simple, but I cannot find anything relevant on the web. What is the
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.