Linebreak converter can't recognize new lines near BBCodes

guido666 - June 26, 2008 - 21:22
Project:Bbcode
Version:6.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

When there is a new line immediately before or after a BBCode, it fails to put in a "BR".

For instance...

...this folder is [b]C:\Program Files\[/b]
.[img]/sites/default/files/FolderInExplorer.png[/img]

... ends up HTML like...
...this folder is <span style="font-weight:bold">C:\Program Files\</span>
.<img src="/sites/default/files/FolderInExplorer.png" alt="" class="bb-image" /><br />

Which renders in a browser "like"...
...this folder is C:\Program Files\ .[IMAGE HERE ON THIS LINE]

Notice the period on the second line, before the image. I put that there intentionally to see if that would help the BBCode filter tell the lines apart. IT DOES NOT. It works the same with or without it.

Interestingly, the built in (Drupal) linebreak converter does the same thing.

#1

guido666 - June 26, 2008 - 21:26

Also, moving the period UP to the first line, like...

...this folder is [b]C:\Program Files\[/b].
[img]/sites/default/files/FolderInExplorer.png[/img]

does the exact same thing.

The line break converter is getting confused somewhere, and can't figure out that there is a new line in there.

#2

naudefj - November 30, 2008 - 10:01

What is your setting for "Smart paragraph and line breaks"?

 
 

Drupal is a registered trademark of Dries Buytaert.