Ticket #616 (closed defect: wontfix)

Opened 7 years ago

Last modified 7 years ago

Space and carriage return linefeed in gecko

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

Description

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 http://xinha.gogo.co.nz/xinha-nightly/e … 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

Changed 7 years ago by wymsy

I added these lines to the GetHtml plugin:

    if(HTMLArea.is_gecko)
        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.

Changed 7 years ago by lasker@…

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

Changed 7 years ago by gogo

  • status changed from new to closed
  • resolution set to wontfix

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.