<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>Why are you using BBCodes?</title>
    <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html</link>
    <description>The discussion on my blog post "Do not use regular expressions for parsing"
ended in a discussion about BBcodes in general. I just used them as an
example to demonstrate why it it is impossible to parse such a language
with regular expressions - and mentioned in a subclause, that I don't see
any sense in using them at all. So why use them at all?</description>
    <language>en</language>
    <copyright>CC by-sa</copyright>
    <managingEditor>Kore Nordmann</managingEditor>
    <managingEditor>Kore Nordmann &lt;website@kore-nordmann.de&gt;</managingEditor>
    <pubDate>Mon, 03 Sep 2007 08:50:49 +0000</pubDate>
    <lastBuildDate>Mon, 03 Sep 2007 09:02:40 +0000</lastBuildDate>
    <generator>eZ Components Feed dev (http://ezcomponents.org/docs/tutorials/Feed)</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <item>
      <title>vans schoenen at Sun, 05 Feb 2012 23:04:32 +0100</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_32</link>
      <description>Use HTML Purifier, it is much much better than BB code which is dumb. I completely agree with your article!</description>
      <author>vans schoenen</author>
      <pubDate>Sun, 05 Feb 2012 22:04:32 +0000</pubDate>
    </item>
    <item>
      <title>Aloha! at Sun, 09 Oct 2011 18:18:51 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_31</link>
      <description>Hey Kore, anything to say about [youtube] and [quote] as gareth mentioned earlier?&#13;
&#13;
gareth does make a good point here. These things are great for those non tech savvy and such. I would rather use BBcode, than to waste anyone's time learning to do [youtube] and [quote] alternative.</description>
      <author>Aloha!</author>
      <pubDate>Sun, 09 Oct 2011 16:18:51 +0000</pubDate>
    </item>
    <item>
      <title>Adidas schoenen at Fri, 21 Jan 2011 16:20:12 +0100</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_30</link>
      <description>Great insights in the comments!</description>
      <author>Adidas schoenen</author>
      <pubDate>Fri, 21 Jan 2011 15:20:12 +0000</pubDate>
    </item>
    <item>
      <title>bayanlarla sohbet at Sat, 18 Dec 2010 23:25:20 +0100</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_29</link>
      <description>I think Bbcodes very usefl for my forum Vbulletin. For special signatures and good looking profiles it is very necessary. Bbcodes are very functional on forums </description>
      <author>bayanlarla sohbet</author>
      <pubDate>Sat, 18 Dec 2010 22:25:20 +0000</pubDate>
    </item>
    <item>
      <title>ezmoz article at Tue, 24 Aug 2010 15:51:19 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_28</link>
      <description>there is nothing wrong with using an optional WYSIWYG-editors if you wanna make it simple for the users.&#13;
&#13;
btw, Thanks for sharing. </description>
      <author>ezmoz article</author>
      <pubDate>Tue, 24 Aug 2010 13:51:19 +0000</pubDate>
    </item>
    <item>
      <title>Chat at Thu, 01 Jul 2010 01:36:23 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_27</link>
      <description>you super sites. admin thanks:))))</description>
      <author>Chat</author>
      <pubDate>Wed, 30 Jun 2010 23:36:23 +0000</pubDate>
    </item>
    <item>
      <title>goedkoop geld lenen at Sun, 13 Jun 2010 20:23:17 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_26</link>
      <description>Use HTML Purifier, it is much much better than BB code which is dumb. I completely agree with your article</description>
      <author>goedkoop geld lenen</author>
      <pubDate>Sun, 13 Jun 2010 18:23:17 +0000</pubDate>
    </item>
    <item>
      <title>Muhabbet at Sun, 13 Jun 2010 17:07:27 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_25</link>
      <description>BBCode is not the only one markup language and I'm using ML on account of rate and simplicity. Wisiwyg editors usually demand keyboard-mouse-keyboard move, while typing **bold text** or ::italic text:: or ++url text++ is straightforward.</description>
      <author>Muhabbet</author>
      <pubDate>Sun, 13 Jun 2010 15:07:27 +0000</pubDate>
    </item>
    <item>
      <title>Sohbet at Sun, 13 Jun 2010 17:06:59 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_24</link>
      <description>nice post, thank you..</description>
      <author>Sohbet</author>
      <pubDate>Sun, 13 Jun 2010 15:06:59 +0000</pubDate>
    </item>
    <item>
      <title>Snel geld lenen at Mon, 04 Jan 2010 21:34:07 +0100</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_23</link>
      <description>I like BBcodes, much easier than regular html</description>
      <author>Snel geld lenen</author>
      <pubDate>Mon, 04 Jan 2010 20:34:07 +0000</pubDate>
    </item>
    <item>
      <title>Tuna at Fri, 01 Jan 2010 23:57:14 +0100</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_22</link>
      <description>Thanks for the comment Void.</description>
      <author>Tuna</author>
      <pubDate>Fri, 01 Jan 2010 22:57:14 +0000</pubDate>
    </item>
    <item>
      <title>gareth at Fri, 13 Jun 2008 00:46:47 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_21</link>
      <description>bbcode is simpler to parse/validate than a subset of html, and simpler for the user, eg.&#13;
&#13;
[youtube]0123456789a[/youtube]&#13;
&#13;
[quote=guy]blaa[/quote]&#13;
</description>
      <author>gareth</author>
      <pubDate>Thu, 12 Jun 2008 22:46:47 +0000</pubDate>
    </item>
    <item>
      <title>Michael at Wed, 04 Jun 2008 14:22:31 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_20</link>
      <description>Familiarity counts. Whether it's a botched variant of HTML isn't relevant for those users that learned their formatting from forum software. So if your users have lots of experience with posting in forums (or a pre-packaged forum plays a part in your site), using BBCode is the path of least resistance.&#13;
&#13;
And I'd rather use Markdown, Textile, roff etc. than a subset of HTML. With a completely separate format, I don't have to keep in mind what tags I can use in this particular textarea...</description>
      <author>Michael</author>
      <pubDate>Wed, 04 Jun 2008 12:22:31 +0000</pubDate>
    </item>
    <item>
      <title>Kredyt at Wed, 30 Apr 2008 16:15:18 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_19</link>
      <description>i use bbcodes, because i work with bulletin boards and its easier to handle than with html. but i agree to kredyt mieszkaniowy, that one language is better than two different:)</description>
      <author>Kredyt</author>
      <pubDate>Wed, 30 Apr 2008 14:15:18 +0000</pubDate>
    </item>
    <item>
      <title>Kredyt Mieszkaniowy at Fri, 01 Feb 2008 11:59:23 +0100</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_18</link>
      <description>Why can we just use one language (inplementation) of HTML, I dont like BBCode :(&#13;
???</description>
      <author>Kredyt Mieszkaniowy</author>
      <pubDate>Fri, 01 Feb 2008 10:59:23 +0000</pubDate>
    </item>
    <item>
      <title>Pete at Sat, 19 Jan 2008 03:18:57 +0100</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_17</link>
      <description>well, BB codes could be advantageous for making comments styling simpler. I can tell you that my community does not want to change back to HTML.&#13;
regards Pete</description>
      <author>Pete</author>
      <pubDate>Sat, 19 Jan 2008 02:18:57 +0000</pubDate>
    </item>
    <item>
      <title>Mastodont at Mon, 05 Nov 2007 07:31:40 +0100</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_16</link>
      <description>BBCode is not the only one markup language and I'm using ML on account of rate and simplicity. Wisiwyg editors usually demand keyboard-mouse-keyboard move, while typing **bold text** or ::italic text:: or ++url text++ is straightforward.&#13;
&#13;
With regard to impossibility to validate ML using regular expressions, what about:&#13;
&#13;
step 1) translate ML with very simple regexps to (X)HTML&#13;
&#13;
step 2) verify resulting code in HTML Purifier</description>
      <author>Mastodont</author>
      <pubDate>Mon, 05 Nov 2007 06:31:40 +0000</pubDate>
    </item>
    <item>
      <title>Void at Sun, 09 Sep 2007 14:15:38 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_15</link>
      <description>However, I think that insecurity is not inherent to any markup language (or markdown or whatever) The insecurity is in the markup change, the implementation needs to remove the input escaping and add the output escaping&#13;
&#13;
(and we need to replace &lt; and &gt; by &amp;lt; and &amp;gt; but also we need to replace &amp; by &amp;amp;, " by &amp;quot; and also ' to &amp;apos;(i think)&#13;
&#13;
But most users forget the tree laters, which can lead to serious problems in security :)&#13;
&#13;
and my parser won't actually escape this, as he is also able to output Text</description>
      <author>Void</author>
      <pubDate>Sun, 09 Sep 2007 12:15:38 +0000</pubDate>
    </item>
    <item>
      <title>Kore at Sun, 09 Sep 2007 09:37:13 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_14</link>
      <description>Thanks for the comment Void.&#13;
&#13;
Writing a fast and real parser is of course very much appreciated for existing applications which are still bound to BBCodes.</description>
      <author>Kore</author>
      <pubDate>Sun, 09 Sep 2007 07:37:13 +0000</pubDate>
    </item>
    <item>
      <title>Void at Fri, 07 Sep 2007 18:34:39 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_13</link>
      <description>I'm the author of the php BBCode extension and I'm happy my (early stage) Extension is mentionned here, I'm currently working on a brandly new parser (i've seen many limitations in the current one)&#13;
&#13;
However, i have to mention that BBCode is only a convention and that nobody (forums, blogs systems &amp; so on) really parse it the same way, my extension was a try to make a unified approach, my "nexgen" parser is described here: http://news.php.net/php.pecl.dev/4825&#13;
&#13;
I don't think BBCode is the perfect solution, however, it's widespread of use in manyforums and so, so i used it on my website and the parsing was a performance critical operation so, i started the extension.&#13;
&#13;
However, I'll be happy to have your feedback on what is "missing" because it's still beta and many new capabilities can be added while still coding.&#13;
&#13;
Just mail me suggestions xavier - the at sign - bmco -dot, yes, just dot- eu &#13;
&#13;
It's fun that people still uses regex (when it's not str_replace) to "parse" (in fact, it's not parsing, as parsing require a tokenization and lexical analysis, phase).&#13;
&#13;
The discussion is however good, and, i agree, BBCode is not a good langage, it's an error, that has been widespread.</description>
      <author>Void</author>
      <pubDate>Fri, 07 Sep 2007 16:34:39 +0000</pubDate>
    </item>
    <item>
      <title>Ronald Iwema at Fri, 07 Sep 2007 14:07:47 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_12</link>
      <description>@kore&#13;
&#13;
I don't agree. Looking at implementing BBCode, u make sure all &lt; and &gt; are replaced by &amp;lt; and &amp;gt;, and then u can process the BBCodes. If u work with a whitelist of allowed HTML elements u have to do more work in implementing it correctly. Also controlling which attributes can be used is easier.&#13;
&#13;
Actually I prefer the "don't let users style there comments" approach.</description>
      <author>Ronald Iwema</author>
      <pubDate>Fri, 07 Sep 2007 12:07:47 +0000</pubDate>
    </item>
    <item>
      <title>kore at Wed, 05 Sep 2007 16:04:24 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_11</link>
      <description>@Ronald Iwema: Where is the difference between a list of BBCodes to transform and a list of allowed (X)Html elements? None.</description>
      <author>kore</author>
      <pubDate>Wed, 05 Sep 2007 14:04:24 +0000</pubDate>
    </item>
    <item>
      <title>Ronald Iwema at Wed, 05 Sep 2007 14:34:50 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_10</link>
      <description>I think the main reason I would use BB is to control which HTML elements a user can use .&#13;
</description>
      <author>Ronald Iwema</author>
      <pubDate>Wed, 05 Sep 2007 12:34:50 +0000</pubDate>
    </item>
    <item>
      <title>philip at Wed, 05 Sep 2007 03:05:33 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_9</link>
      <description>See Also: http://php.net/bbcode</description>
      <author>philip</author>
      <pubDate>Wed, 05 Sep 2007 01:05:33 +0000</pubDate>
    </item>
    <item>
      <title>Joakim Nygård at Tue, 04 Sep 2007 15:59:38 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_8</link>
      <description>I've never liked BBCode. Every time I get the chance to influence a decision about formatted input, I suggest Markdown. Created by John Gruber (daringfireball.com) it looks like one would format a plain text file. Simple and easy to understand.&#13;
&#13;
Security concerns are obviously dependant on the actual code used to parse the Markdown into html and so is not part of the syntax itself.&#13;
&#13;
One advantage to using an intermediate syntax and convert it to html is that it gives you the option of outputting it in other structures -updated html/xhtml for instance. In other words, you are not stuch with whatever code was entered but can update the parser to follow new standards.</description>
      <author>Joakim Nygård</author>
      <pubDate>Tue, 04 Sep 2007 13:59:38 +0000</pubDate>
    </item>
    <item>
      <title>Kore at Mon, 03 Sep 2007 23:19:13 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_7</link>
      <description>@iamsure:&#13;
&#13;
The prove, that you can't use regular expression to validate / parse BBCodes is here: http://kore-nordmann.de/blog/do_NOT_parse_using_regexp.html&#13;
&#13;
There is no option for discussion on that, until you either prove some of the basic axioms of common mathematics as wrong, or show, in which way my analytic proof is broken.</description>
      <author>Kore</author>
      <pubDate>Mon, 03 Sep 2007 21:19:13 +0000</pubDate>
    </item>
    <item>
      <title>Kore at Mon, 03 Sep 2007 23:16:32 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_6</link>
      <description>@Evert: I explicitely said, that blacklisting won't work well. Use whitelistin. I wrote that in the blog post. You of course should never try blacklisting in this context.</description>
      <author>Kore</author>
      <pubDate>Mon, 03 Sep 2007 21:16:32 +0000</pubDate>
    </item>
    <item>
      <title>iamsure at Mon, 03 Sep 2007 22:27:13 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_5</link>
      <description>For me, its that I'm familiar with bbcode. I know html, and I know bbcode, but when posting to a forum, or similar, bbcode is what seems most comfortable.&#13;
&#13;
My blog (from blogger) supports html, and I've known html for far longer, but yet bbcode seems more comfortable in that context. &#13;
&#13;
In my case, I like using bbcode, and its that simple. Its not about security, or ease of use, or even XSS. Its just what I feel comfortable using in that context.&#13;
&#13;
But beyond that, its an interesting problem to solve, which I enjoy. Sure, I could tell users to only use html. Or plain text. Or SGML docbook. But supporting technologies that make things easier for users is appealing - even if it is truly challenging to support well.&#13;
&#13;
I disagree with your assertion that it has been &lt;b&gt;proven&lt;/b&gt; that you cannot implement bbcode with regex. I'd say that its extremely challenging to do well, and to do in multiple levels of nesting. Those are not the same things. :)</description>
      <author>iamsure</author>
      <pubDate>Mon, 03 Sep 2007 20:27:13 +0000</pubDate>
    </item>
    <item>
      <title>mg at Mon, 03 Sep 2007 20:50:48 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_4</link>
      <description>I was asking myself why people started using MarkDown or one of the many WikiSyntax in their blogs. Next step would be the same shit in forums. As it goes for my blog i'm using a minimal set of allowed HTML-tags.&#13;
&#13;
Basically there is nothing wrong with using an optional WYSIWYG-editors if you wanna make it simple for the users. Just don't use BBCode. Who doesn't understand it doesn't understand it.&#13;
&#13;
The argument “it's safer” doesn't count on HTML. You don't need to use blacklists but whitelists with your allowed tags and attributes instead, and a Markup cleanup like tidy. &#13;
&#13;
I also ask myself why i always have to see these useless font-family and color-dropdowns in WYSIWYG editors. Give the users a format dropdown! Induvidualism is a no-go on forums!&#13;
&#13;
Just a basic set of XHTML 1.1 formatting is enough!</description>
      <author>mg</author>
      <pubDate>Mon, 03 Sep 2007 18:50:48 +0000</pubDate>
    </item>
    <item>
      <title>Tobias Struckmeier at Mon, 03 Sep 2007 19:39:31 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_3</link>
      <description>@ Evert:&#13;
You don't want blacklisting. You want whitelisting which you can achieve with several classes which rebuild the input DOM, but only with the "save" elements and with validated attribute values.&#13;
An additional benefit of html input for "rich text enabled" fields is that you have the possibility of using the browser as a wysiwyg html editor. Anybody is able produce html code that way.&#13;
And I don't see the extra fallback you speak of? People which let bypass &lt;script&gt; also don't escape their sql queries ;).&#13;
&#13;
Classes which provide such features are for example:&#13;
fDomDocument (http://fcms.de)&#13;
HTML_Safe http://pear.php.net/package/HTML_Safe&#13;
HTMLPurifier http://htmlpurifier.org/&#13;
&#13;
Sure in all those there might be holes as well. But the code is better to maintain, understand and to fix than a huge amount of regular expressions.</description>
      <author>Tobias Struckmeier</author>
      <pubDate>Mon, 03 Sep 2007 17:39:31 +0000</pubDate>
    </item>
    <item>
      <title>martynas jusevicius at Mon, 03 Sep 2007 17:55:42 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_2</link>
      <description>Hey. I was thinking about the same -- that BBCode is no better than HTML, it's just yet another sort of markup. It is easier to deal with, I would say -- if the tags don't parse, just leave them as text, while with HTML is not that simple.&#13;
But the problem lies deeper I think -- the is no elegant way to edit and embed (the HTML code of) websites. I don't expect users to know ANY markup language. WYGIWYG is not a good solution either, because they produce crappy source code and are overkill in most situations.</description>
      <author>martynas jusevicius</author>
      <pubDate>Mon, 03 Sep 2007 15:55:42 +0000</pubDate>
    </item>
    <item>
      <title>Evert at Mon, 03 Sep 2007 17:53:24 +0200</title>
      <link>http://kore-nordmann.de/blog/why_are_you_using_bbcodes.html#comment_1</link>
      <description>I do think BBCode is more secure than trying to clean html. Black lists for HTML almost never are 100% waterproof, just because there are so many variations. By using BBCode, everything that wasn't handled correctly by the parser will simply be spit out as their BBCode.. e.g.: [script] is harmless. Making the same mistake with cleaning html would produce &lt;script&gt;.&#13;
&#13;
Academically it could be just as secure, but when you consider that their might be bugs in software (and there always is) BBCode provides an extra fallback..&#13;
&#13;
That doesn't make it pretty though, therefore I would still stick with HTML or a wiki-like syntax to do this stuff.</description>
      <author>Evert</author>
      <pubDate>Mon, 03 Sep 2007 15:53:24 +0000</pubDate>
    </item>
  </channel>
</rss>

