Improved nl2br plugin

For a longe time, people complained that the Serendipity NL2BR plugin (which converts newlines to proper HTML linebreaks) occasionally converted too many newlines. For example, within "code" or "pre" or "table" tags it is not desired to have linebreaks.

For the same amount of long time, the Serendipity developers did not really have a chance to dig into the regular expression magic that was required to fix this. Luckily for us, the awesome Brendon K came around and improved the plugin for us. :-)

We have now committed his code into the official Serendipity SVN trunk, so that it will be contained in tomorrows Snapshots as well as the final Serendipity 1.1 version.

We hope that this will be useful for you, and many thanks to Brendon - we hope there will be many other cool patches you can send to us. :-)


Trackback-URL für diesen Eintrag

  • Keine Trackbacks


Ansicht der Kommentare: (Linear | Verschachtelt)

Carl am um :

Fantastic news, and if Brendon reads this, welcome to the world of Serendipity, your code change is very much appreciated.

Brendon am um :

Aww shucks. Thanks, guys! As Garvin said, I helped out with the regular expression stuff but Garvin modified the plugin to allow custom tags...not to mention I had help creating the regular expression functions as it was. I'm glad it'll help out the community and future users of Serendipity!

CoSTa am um :

finally! one of the very basic formatting plugin got extended. grat news and an useful extension. thanks for that!

Jon am um :

Spartacus doesn't seem to be finding this update, should it?

I'm curious to find out whether or not this prevents the "br" tags from being inserted inside of lists ("ul", "ol", "dl") as well -- since that's been more of a pain for me than "code" or "pre" tags.

Garvin am um :

Jon: No, it shouldn't. The plugin is bundled with Serendipity, not provided via Spartacus.

Thus you need to fetch the recent snapshot or fetch the plugin from that snapshot or SVN.

And, yes, you can configure the list of tags. Thus you can include ul, ol and dl in the list of non-nl2br-able tables.

HTH, Garvin

eckes am um :

I vote for adding the bundeld plugins (if they use only standard plugin api) to spartacus, so we can have a quick/easy access to fixes like that.

And: thanks for that fix, that was really really important.

Dennis am um :

Thanks to Brendon.Really cool.

Kommentar schreiben

Die angegebene E-Mail-Adresse wird nicht dargestellt, sondern nur für eventuelle Benachrichtigungen verwendet.

Um maschinelle und automatische Übertragung von Spamkommentaren zu verhindern, bitte die Zeichenfolge im dargestellten Bild in der Eingabemaske eintragen. Nur wenn die Zeichenfolge richtig eingegeben wurde, kann der Kommentar angenommen werden. Bitte beachten Sie, dass Ihr Browser Cookies unterstützen muss, um dieses Verfahren anzuwenden.

BBCode-Formatierung erlaubt
Markdown-Formatierung erlaubt