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

Lukas W.

Well-known member
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?
 
Look at how some of the core BB code rules are defined in XF\BbCode\RuleSet:
Code:
$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.)
 
Look at how some of the core BB code rules are defined in XF\BbCode\RuleSet

Thank you! Should've thought about looking into the options in the ruleset. All I remebered was that it is the place to define options. :X3:
 
Back
Top Bottom