Hi, so I noticed some problems with codes.

1/ When I use [color=red][size=20]test[/size][/color] it works, but if I do [size=20][color=red]test[/color][/size] it doesn't work anymore, only the size is taken, not the color.

2/ If I do : My title [HR], the result fails xhtml validation because it puts the [HR] inside a (p) tag, which is forbidden.

3/ Lists and divs are forbidden inside (code) tags but bbcode allows this. And as alignment uses div, we cannot align the text inside a (code)

I'll follow up other issues in this subject when I find some...

Thanks

Comments

naudefj’s picture

Please provide an example of 3?

Julien PHAM’s picture

Ok :

If I write : MY TITLE[HR]

BBCode translates it as:

<p>MY TITLE<hr class="bb-hr" /></p>

If I write : [size=20][color=red]my sentence[/color][/size]

BBCode translates it as:

<p><span style="font-size:20px"><span style=\"color:red\">my sentence</span></span></p>

And so it does not work.

If I write : [right]right text[/right]

BBode translates it as:

<p><div style="text-align:right">right text</div></p>

And this is not valid xhtml because there's a (div) inside a (p).

If I write :
[code]
[list]
[*]first item
[*]second item
[/list]
[/code]

BBCode translates it as:

<p><code>
<ul class="bb-list"><li>first item
</li><li>second item
</li></ul>

And it is not valid html because (pre) is not allowed here, and btw (ul) is not allowed into a (p) also.

Thanks ;)

naudefj’s picture

Assigned: Unassigned » naudefj
Status: Active » Fixed

1. Fixed in CVS.

2. You should code the [hr] in a paragraph of its own.

3. Use [notag] instead of [code].

Julien PHAM’s picture

Thanks a lot ;)
About [code], perhaps a good thing would be to desactivate it, so the user cannot use it...

Anonymous’s picture

Status: Fixed » Closed (fixed)