Opened 15 years ago

Closed 14 years ago

#616 closed defect (wontfix)

Space and carriage return linefeed in gecko

Reported by: lasker@… Owned by: gogo
Priority: normal Milestone:
Component: Xinha Core Version:
Severity: normal Keywords:


In Netscape and Firefox i have after the start of xinha in a empty textarea a Space and a carriage returen linefeed. No HTML is in the textarea.
After a save of this "empty" textarea i store this in my database.

This problem i don't have with the IE. A empty textarea is empty. What can i do?

You can see this in the demo … ample.html

Test it with firefox, switch to html and you see a empty line and then <p>.
Test it in IE and you don't see the empty line.

Change History (3)

comment:1 Changed 15 years ago by wymsy

I added these lines to the GetHtml? plugin:

        html = html.replace(/(.*)<br \/>\n$/, '$1'). //strip trailing <br> added by moz
            replace(/^\n(.*)/, '$1'); //strip leading newline added by moz

to get rid of the empty line as well as the <br> that sometimes gets added at the end. The same fix ought to work in the built-in getHTML. Just add the above lines right before the return.

comment:2 Changed 15 years ago by lasker@…

I have test this a little bit. Looks fine for this time. Thanks a lot.

comment:3 Changed 14 years ago by gogo

  • Resolution set to wontfix
  • Status changed from new to closed

WONTFIX in the core, because who are we to say they don't want a trailing <br/> (especially if Mozilla fix the problem one day and Xinha starts to delete legit trailing br's). It's also something that can be done on the server if the user wants.

Note: See TracTickets for help on using tickets.