<br> and <p> tags showing in code

Found a bug? Tell us!!
Post Reply
TKS
Regular
Posts: 199
Joined: Thu Nov 11, 2004 1:34 am
Location: VA, USA
Contact:

<br> and <p> tags showing in code

Post by TKS »

Not sure if this is a bug for everyone by default...

http://linux-blog.org/index.php?/archiv ... l#extended

I've got those tags showing in code even when I have code not set to convert new lines to <br /> with the Markup: NL2BR event plugin. It's also doing this for <p> tags as well.

Anyone know how I can fix this problem? Is this problem widespread or is it just me?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: <br> and <p> tags showing in code

Post by garvinhicking »

Hi!

What do you mean with "even when I have code not set to convert..."?

The nl2br plugin does that, because HTML-tags within

Code: Select all

 BBCode tags get converted into HTML entities. So you'd need to disable the nl2br plugin for postings where you want to use [code].

Since [code] is a BBCode tag and not a HTML tag, you cannot put it into the nl2br plugin configuration for exlcuded tags, this will not work.

You might be able to solve it if you put the BBCode plugin AFTER the nl2br plugin?

Regards,
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/
TKS
Regular
Posts: 199
Joined: Thu Nov 11, 2004 1:34 am
Location: VA, USA
Contact:

Post by TKS »

I tried putting it after but that didn't work.

If I remove the nl2br plugin, will my previous entries become messed up?
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Yes, anything that depends on nl2br for its line breaks will be run together into a single paragraph. Reinstalling nl2br will fix it, though; the entries themselves won't change. nl2br is applied during output, and doesn't modify the entry itself.

It's weird that it only shows up in one of the code blocks. Why is that? Are you sure it's not actually in the entry?
Judebert
---
Website | Wishlist | PayPal
TKS
Regular
Posts: 199
Joined: Thu Nov 11, 2004 1:34 am
Location: VA, USA
Contact:

Post by TKS »

yeah, I'm sure.

I went into the entry itself and looked and things are ok using the WYSIWYG editor...perhaps I should try it without for this entry? Not sure...I'll give uninstalling and re-installing it a go though.
TKS
Regular
Posts: 199
Joined: Thu Nov 11, 2004 1:34 am
Location: VA, USA
Contact:

Post by TKS »

I've fixed it for now by breaking the lines up into two distinct code tags.

However, this is still odd...are there any other ways of posting code into an entry besides BBCODE tags with the BBCODE plugin?
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

I've always just used the <code> or <pre> HTML tags. Of course, I don't have nl2br enabled for entries, so this might not help you...
Judebert
---
Website | Wishlist | PayPal
TKS
Regular
Posts: 199
Joined: Thu Nov 11, 2004 1:34 am
Location: VA, USA
Contact:

Post by TKS »

I'm thinking about removing that plugin but am concerned about what it will do to my entries...do you think it will have adverse effects on them?
Post Reply