Video Description with HTML characters breaks template

Video Descriptions that contain HTML code (i.e. a href links etc), break the header of the "play" page. What happens is that this HTML code gets jumbled at the top of the header, displaying the raw HTML and consequently pushing the rest of the header down.

I traced this back to the "writeMeta()" function in the "lib/View.php" class. I fixed this by wrapping a htmlentities() around the $this->vars->meta->description variable.

GM

Comments

  • Can you please show exactly what you did!
    Thank you in advance
  • Sure;

    Edit /cc-core/lib/View.php

    On line 377:

    Change:

    if (!empty($this->vars->meta->description)) $this->addMeta('description', $this->vars->meta->description);


    to:

    if (!empty($this->vars->meta->description)) $this->addMeta('description', htmlentities($this->vars->meta->description));

    Hope that helps!

    Cheers,

    GM
  • Hello
    It works! (it doesn't brake any more) but while testing a link on the description it goes to 404 error page and the url looks like this:
    http://tv.cotorrea.com/"http://unpaidcredit.com/"

    when I typed the url at the description like this:
    visit site

    and after updating the video in the description the url looks like this:
    visit site
  • The code change I showed above only applies to the page's Meta data (i.e. title etc) and should not affect the links in the description.

    I just double checked some of my videos that had that problem, and the links in the description continue to work fine. Sooooo, I think you may have messed up the link when you entered it in your description box. Is that possible?
  • Hello

    I had to deleted the sub-domain, create it again and then installed the script again; made the changes you said and all is great now!

    Thank you! case solved!
This discussion has been closed.