Conversion from HTML output to BBCode output

Now the output text should be completely BBCode instead of HTML.
Old HTML output left commented out for reference.