XF 2.1 Custom BBCode - Avoid Parsing URL

kbryant414

Active member
I'm running into an unusual error with a custom bbcode, which is a variant of the IMG bbcode. The simple intention is to float the image to the right. This code worked previously on vB4, and I thought it was working here in an earlier version, but as of the newest version, it's not working. If it was working before, I'm not sure which update caused it to stop working.

From what I can tell, the software is automatically applying URL tags to the link for the image, and this is somehow breaking the custom BBcode. However, the standard Xenforo IMG code doesn't do that. If I edit the post after, in the editor I can see the difference as below.

Default IMG code​
[IMG]https://i.imgur.com/9u62p8c.png[/IMG]​
Custom IMG2 code​
[IMG2][URL]https://i.imgur.com/9u62p8c.png[/URL][/IMG2]​

Now, as a work-around, I can put PLAIN tags around the URL, and then the custom code works again.

Workaround for IMG2​
[IMG2][PLAIN]https://i.imgur.com/9u62p8c.png[/IMG2][/plain]​

Is there something I can put in the HTML replacement that would prevent the text between my custom tags from being automatically encased in URL tags?

Thanks.
 
Top Bottom