Advertisement:

Author Topic: <video> tag breaks RSS  (Read 170 times)

Offline MobileCS

  • Jr. Member
  • **
  • Posts: 177
<video> tag breaks RSS
« on: November 04, 2019, 09:13:28 PM »
When I embed videos on the forum, it breaks the RSS feature.

The code I am using is :

Quote

[html]<video autoplay="" loop="" width="200" height="400"><source src="https://www.example.com/whatever.mp4" type="video/mp4"></video>[/html]


The error I am getting is :

Quote
A name was started with an invalid character.
Line: 761 Character: 2

<:video autoplay="" ...

I'm not sure why <video> is getting translated to <:video> when it gets parsed for RSS.

Any ideas how I can fix this?

Offline MobileCS

  • Jr. Member
  • **
  • Posts: 177
Re: <video> tag breaks RSS
« Reply #1 on: November 04, 2019, 10:17:31 PM »
It appears the CDATA block gets closed early when using the [html] bbc tag.

Quote
<![CDATA[My content here ...<br /><br />]]><:video autoplay="" loop="" width="192" height="24...

Offline MobileCS

  • Jr. Member
  • **
  • Posts: 177
Re: <video> tag breaks RSS
« Reply #2 on: November 05, 2019, 11:45:39 AM »
I've temporarily solved the issue by adding the following to the cdata_parse function in Sources/News.php file

Quote
$data = preg_replace('/\[html\](.*?)\[\/html\]/', "", $data);

Is this a known bug?