XF 1.4 Remove custom BB code tag if it's not finished

When inserting an image and typing: [IMG]this is a test
and posting the thread it will appear like: this is a test
(it drops the tag)

However, with the custom BB code I made typing: [head]this is a test
tries to use all the text following the tag for the {text} in the BB code

Here are my custom BB code options:
BB Code Tag: head
Title: Minecraft Player Head
Description: Inserts a Minecraft player head using the wrapped text as a name (or UUID).
Replacement Mode: Simple Replacement
Supports Option Parameter: No
HTML Replacement: <img src="http://cravatar.eu/helmavatar/{text}/16.png" alt="{text}" height="16" width="16">
Within This BB Code:
x Disable smilies
x Disable line break conversion
x Disable auto-linking
x Stop parsing BB code
x Display HTML replacement when empty​

How can I make it perform how the[IMG] tag does? That is, dropping the initial tag if there is no end tag.
 
BB code is automatically closed and rendered. There are cases where this will work with the image tag; we just detect that it's not a URL and don't render it in your example.

To do something like that, you would need a custom callback for your BB code.
 
Back
Top Bottom