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

As Designed Custom BBCodes With No Content Get Eaten

Discussion in 'Resolved Bug Reports' started by Teapot, Feb 2, 2014.

  1. Teapot

    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: Feb 3, 2014
    Liam W likes this.
  2. Liam W

    Liam W Well-Known Member

    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.
     
  3. Mike

    Mike XenForo Developer Staff Member

    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).
     
    Teapot likes this.

Share This Page