Outer newlines get removed in preview

Found a bug? Tell us!!
Post Reply
WebComPas
Regular
Posts: 101
Joined: Thu Nov 22, 2007 10:14 am
Contact:

Outer newlines get removed in preview

Post by WebComPas »

Hallo!

Sometime I place a newline at the beginning or at the end of an entry for using nl2br-Plugin. When I click on "Preview" the nl2br-Plugin works corretly, but in the textarea field the newline has been cut off. If the newline is somewhere within the text this doesn't happen.

I hope, this will be fixed soon.

Regards,
Pascal
Interessantes aus den Themenbereichen Computer, Internet und Programmierung unter http://www.it-blog.net
onli
Regular
Posts: 3044
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Outer newlines get removed in preview

Post by onli »

If you write a new entry and end it normally, if often happens that there is one newline accidentally remaining, so removing those br sound reasonable to me. nl2br probably shouldn't be used to extend the distance between blog-entry and boundaries, CSS is the better tool for that job.

But maybe this effect is really not intended and therefore a bug?
sincerely
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Outer newlines get removed in preview

Post by garvinhicking »

Hi!

s9y applies a "trim" when displaying the textarea, that is required to prevend trailing or appending newslines, as these often cause more trouble; IMHO those should not be needed to be placed by a user.

If you want to force it, make it a "<!--blank-->[RETURN]", then the HTML comment will not trigger the trimming of spaces at the beginning.

HTH.
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply