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

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

katsulynx

Well-known member
#1
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?
 

Mike

XenForo developer
Staff member
#2
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.)