BBcode can go pretty horrifically wrong from a security perspective because you&#x27;re still generating HTML markup based on unstructured, untrusted user input. There&#x27;s a long and nasty history of XSS issues in forums that use BBcode where clever use of mismatched markup has made it possible to break the HTML generator enough to inject JavaScript and other nasties.