Hi,
So when we ask drupal to insert line breaks, in filtered html mode, it is fine, for the end user. Drupal inserts <br /> for each line break, it is ok...

But at the beginning and end of the document it inserts <p> and </p>, which is a really problem, because it prevents us to use some html formatting, such as <ul> for lists, they are not allowed inside "p" tag.

I think an article in filtered mode should never include "p" tags, but instead use only "br" tags.

Comments

Julien PHAM’s picture

I should add that when we insert two empty lines, it places the "p" tag. Some issues with lists then...

chx’s picture

Priority: Critical » Minor
Status: Active » Closed (won't fix)

Have you actually looked at a filtered node with a list ? I know you did not because then you would see that the p does not wrap that...

Julien PHAM’s picture

Mmm what did you say? I don't understand :)
What I mean is that... I use bbcode to change code into html. So bbcode changes some stuff like [list] into "ul" tags. But as drupal puts "p" tags everywhere, then the final code is not xhtml because we have a "ul" tag into "p" one.

I don't know how to fix that...

But perhaps it is bbcode side to implement a way to remove "p" tags when there is a "ul" one.

chx’s picture

then it's a bbcode problem and not a core problem. I have entered some text, a list and it was all valid XHTML. So please change to the appropriate project (whatever bbcode module you use).

Julien PHAM’s picture

Project: Drupal core » Bbcode
Version: x.y.z » master
Component: node system » Code
Priority: Minor » Critical
Status: Closed (won't fix) » Active

You're right, I'm sorry. I'm doing the change.
btw this issue is related to this one:
http://drupal.org/node/51152

naudefj’s picture

Assigned: Unassigned » naudefj
Priority: Critical » Minor
Status: Active » Closed (duplicate)

Close as a duplicate of http://drupal.org/node/51152