As designed Custom BBCodes With No Content Get Eaten

Teapot

Well-known member
Probably "As Designed" in this case, but essentially I'm trying to add a [hr] tag for my site that produces a single <hr /> tag. As you'd expect, the way we'd make that work is to convert a [hr][/hr] tag, without any contents, into <hr /> as a simple HTML replacement.

Unfortunately, XenForo automatically eats any empty tags as part of its usual cleanup duties. This is fine (and incredibly useful) in most cases, but there are certainly situations where you'd want to suppress this behaviour like the one I describe.

Is it possible to add some sort of "Allow no content" option to selectively suppress this?
 
Last edited:
It would be much nicer as well if you could have a self closing tag, so that you don't have to have two next to each other with no content.
 
This is "as designed", yes. You'll see this behavior with other tags, though I do take your point. More of a general suggestion though (I think the parser does expose this as an option).
 
Top Bottom