Extension talk:BBCodeSyntax/Archive 1

To Do...
--KaizenNeko 07:38, 31 July 2009 (UTC)
 * Add URL support.
 * Clean up SPAN tags.
 * Figure out implementation of IMG tag.
 * Get HTML sizes working for FONT.
 * Change GREEDY matches to LAZY matches. See below.
 * Actually get v0.2 ready for posting.
 * Optimize with arrays (per Pawelabrams suggestion)
 * Make sure to post process and strip HTML from the inputted BBCode (as advised under "Do not trust the user")
 * Acutally work on the extension.

[v0.1] Nested BBCode Parsing Bug
Identical tags that are nested in other tags are not parsed.
 * I actually found a solution to this and will be issuing an update later on.
 * Basically the fix involves using LAZY matches instead of GREEDY ones.

--NekoOuterverse 15:25, 11 February 2008 (UTC)

Other BBCodes from HTML
Maybe add abbr, pre, table(s) similar tags to v0.3? --NekoOuterverse 14:24, 2 July 2008 (UTC)

This looks quite slow
This could be done using 5-6 preg_replaces and 2 str_replaces. I'll post a code snippet soon. Pawelabrams (mail me on gmail, same nick ;p ), 86.63.134.78 21:02, 24 March 2009 (UTC)


 * Yup, I knew I had something like that somewhere... Re-made one, currently 5 tags supported: Pawelabrams, 86.63.134.78 21:02, 24 March 2009 (UTC)


 * My knowledge at the time was (and still is) pretty basic of Regex & PHP. I'll make sure to implement arrays if I update this thing again.

Do not trust the user
Script doesn't verify if the values are correct or not. In the BGCOLOR code you just insert in the style attribute one could insert anything.. like [bgcolor=" >alert(1); red]background[/bgcolor] It's not that hard to add code to check for some color constants.


 * Basically I need to add in a post processor that strips HTML tags from being inserted.

Joining in the project...
Well, I've decided to join in the BBCode for MediaWiki project and improve the extension with my knowledge of PHP! Techjar 14:56, 13 August 2009 (UTC)

Suggestion for [url] tag
Hi, i resolved the [url] tag problem (and [img]), with a conversion from bbcode to wiki (and not to html), with the ParserBeforeStrip hook.