Ignore unclosed BBcode tags

mgl

Member
Hello,

Currently this text:
Code:
this is a [i] a sample text

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


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:
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.
 
Top Bottom