From Wikipedia, the free encyclopedia - View original article
|This article needs additional citations for verification. (April 2011)|
BBCode or Bulletin Board Code is a lightweight markup language used to format posts in many message boards. The available tags are usually indicated by square brackets ([ ]) surrounding a keyword, and they are parsed by the message board system before being translated into a markup language that web browsers understand—usually HTML or XHTML.
BBCode was first introduced in 1998 by the messageboard software Ultimate Bulletin Board (UBB).
(usually implemented in more advanced ways)
|To quote: |
(The unit of measurement varies with each BBCode variant and could represent pixels, points, or relative HTML sizes.)
(And other emoticons, depending on the variant. Most BBCodes do not enclose emoticons in square brackets, leading to frequent accidental usage)
(Specific image and size vary)
Some message boards do not need the square brackets around the markers, e.g.:
(many variants for li and /li, list types (unordered and ordered, with different bullets or counter formats), etc.)
BBCode is typically implemented by applying a series of regular expression string-replace operations upon the input. Because regular expressions are limited in analyzing the structure of text input, this has the artefact that any non-hierarchical BBCode input will be transformed into invalid non-hierarchical HTML without error.
Applying traditional parsing techniques is made difficult by ambiguities in the markup, such as in
[quote=[b]text[/b][/quote], where the input can either be interpreted as "text" quoted from someone called "[b", or the bolded text "text" surrounded by "[quote=" and "[/quote]".