XF 2.0 Prevent BB code renderer from auto-converting urls inside certain tags

Lukas W.

Formerly katsulynx
I've come across an issue with my parsehtml BB code where tags like a or iframe will break because the BB code renderer will auto-convert their src-attributes from the plain URL to URL. Is there a way to prevent this from happening within the parsehtml tag, but leave it functional for everything else?


XenForo developer
Staff member
Look at how some of the core BB code rules are defined in XF\BbCode\RuleSet:
$this->addTag('media', [
   'hasOption' => true,
   'plain' => true,
   'stopSmilies' => true,
   'stopAutoLink' => true
Just need to define that last option for your tag. (I assume it's not a custom BB code in the ACP, because if so, then it's one of the options there.)