Fixed custom Media bbCode for local videos


Active member
I have a website running XenForo.
I have lots of videos (tutorials) on my site to post to XenForo threads.
I store these videos (and some additional files) in subfolders like:

What I need to pass through my custom Media bbCode would look like this:

  • [media=mysitename]photoshop/howtomakeshadows[/media]
  • [media=mysitename]xenforo/custommediabbcode[/media]
Problem is, that the string is stripped at the slash.
So all that is passed to the corresponding place in the object code is:

  • photoshop
  • xenforo
... and the whole thing doesn't work as you can imagine. :)


Active member
To try this bug the easy way, you can simply use an image (see attached screenshot).


Expected result in HTML code would be:
<img src="" alt="" />

Actual result is:
<img src="" alt="" />

Hope this helps. :)


XenForo developer
Staff member
I'm not sure how you actually got that result. If you have a media tag with a slash in the value, you'd get nothing. If you're pasting the URL into the media popup, then that is the expected behavior. The slash is traditionally a splitter for IDs.

I have changed this to allow the slash to be manually placed within the media BB code tag though.