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

Cannot add a [video] BBCode

#1
I'm trying to add a simple [video] BBCode:

Code:
<video width="100%" height="100%" autoplay>
<source src="{text}" type="video/ogg" />
HTML5 video not supported.
</video>
But when I add it to a page with the format:

Code:
[video]http://123.123.123.123:8080[/video]
I get this resulting mess of HTML:

Code:
<video autoplay="">
<source class="externalLink" target="_blank" 123.123.123.123:8080"="" http:="" src="&lt;a href="></source>http://123.123.123.123:8080" type="video/ogg" /&gt;
HTML5 video not supported.
</video>
The reason it does this is because it will always save the BBCode as:

Code:
[video][URL]http://123.123.123.123:8080[/URL][/video]
The best way to fix this is to place the URL in the option. I also allowed customization of the error message:

Code:
<video width="100%" height="100%" autoplay>
<source src="{option}" type="video/ogg" />
{text}
</video>
Usage:

Code:
[video=http://123.123.123.123:8080]HTML5 video not supported.[/video]
 
Last edited: