1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Ignore unclosed BBcode tags

Discussion in 'XenForo Development Discussions' started by mgl, Jun 21, 2015.

  1. mgl

    mgl Member


    Currently this text:
    this is a [i] a sample text
    Becomes this (everything italic after [i]):

    Is there a way to make the BBcode tags work only if there is a matching closing tag? I was looking in library/XenForo/BbCode/parser.php but did not find anything.
    Last edited: Jun 21, 2015
    Adam K M likes this.
  2. mgl

    mgl Member

  3. Mike

    Mike XenForo Developer Staff Member

    You'd have to change how the parser works, doing backtracking to change how the stack is handled when it comes to unclosed tags. It wouldn't be trivial.

Share This Page