I'm not sure why the bbcode.module uses span's for [i] and [b]. This patch merely changes those span tags to the appropriate em or strong tag.

The patch applies to both CVS and 4.5.

Also, is there any specific reason all the styles are inline? I'm currently working on pulling out the inline styles, and linking to a stylesheet, much like the quote.module does. I'll put up a patch when I get that all finished up.

CommentFileSizeAuthor
bbcode.patch1.17 KBjoshuajabbour

Comments

Sage-1’s picture

Why not change this patch to simply add [em] and [strong] and allow [i] and [b] to translate to the italic and bold tags? Sometimes you want to force italics for things like titles and such, rather than use the user-defined em tag. Someone may have their browser set to underline an em instead, and that may not always be appropriate.

gábor hojtsy’s picture

[b] and [i] are presentational, while strong and em have semantic meaning, they are not interchangeable!

joshuajabbour’s picture

Yes, I realize they aren't interchangeable. I suppose I looked at the way I use the bbCode tags of [b] and [i] (in a semantic way), and thought this should be changed to do that. But I suppose many users expect them to translate literally. :)

Instead, maybe Sage's suggestion is best...

taylorgj’s picture

I wish to convert all my bbcode tags to straight html - how would I do this (Drupal 6.x)?

TIA
John

Please, not enhanced patch!