XF 1.5 filter other bbcode in custom bbcode text

ungovernable

Active member
I have a [DL] BBCode i'm using to display a special formatting when users want to add an external download link

The problem is that sometimes the user will copy a download link URL from a website which already embbed it in a link. So the URL will be pasted in XenForo text editor as a link, thus breaking my custom bbcode, resulting in something like

My bbcode looks like:
<a href="{text}">{text}</a>

Is there a way to prevent this ?

Can i use regex to remove bbcode tags ? If i understand correctly the regex option is just to validate the input, so no solution for my problem ?
 
Last edited:
Back
Top Bottom