BBCode

BBCode (of English. Bulletin Board Code ) is an ajar to HTML, but simplified markup language preferred for the creation of posts in Forums (English bulletin boards ) is employed. BBCode is not officially regulated, but is due to its high prevalence represents a quasi-standard as well as a Best Current Practice

BBCode was first (UBB ) introduced in 1998 in the Webforensoftware Ultimate Bulletin Board Version 3, and is therefore sometimes referred to as UBBCode.

Description

Many text Awards function in BBCode analogous to HTML, for example, [b ] bold [ / b ], [i ] italic [ / i] and [u ] underlined [ / u]. BBCode addition, if not available directly from HTML, allows even complex elements, such as lists, which are defined as follows: [list ] [* ] Item 1 [* ] item 2 [ / list].

Often BBCode is an easy-to -use interface above or below the input form - similar to standard text editors - available. This is then combined with JavaScript or server-side programming languages ​​such as PHP or Perl. Gladly, there are then also pop-ups, in which the auszuzeichnende text, list items, etc. can be entered. Of course you can enter manually the elements too.

The use of BBCode user texts can similarly distinguished as HTML, without the input of HTML must be allowed. Questionable safety elements, such as JavaScript or layout of the website annoying tags can thus be generally excluded. Filtering out dangerous HTML tags ( at the same time allowing of non-hazardous ) can in fact easily prove to be prone to errors or insufficient.

Structure and scope

Unlike other markup languages ​​BBCode is not officially regulated, thus differs from implementation to implementation. However, the basic structure and scope is largely the same, forming a de facto standard. Larger and more specialized a topic forums and extend the default set of BBCodes often by some of their own code.

Parsing

BBCode as such would be a web browser, just text. He does not appear as such, but a special formatting effects, it must be previously processed on the server side by a parser script. This will search the text entered before delivery to the browser for specific BBCode tags and replaces them with appropriate HTML tags. For example, the BBCode tag [b ] text [ / b] for bold text to write replaced by the HTML tag text , but not necessarily a stand-alone [b ], so that no after parsing syntax error in the output HTML emerge. Before replacing regular expressions are commonly used. As a rule, always parsed " one-way", that is, a forum post will be entered into the database together with BBCode located behind the forum, and each time the contribution is through the browser, the parser BBCode replaced by HTML.

Parser scripts can be written in various server-side programming languages ​​; common are as PHP and Perl.

33664
de