[Fixed] htmlentities escape bug - still present in CC 2.5.1

edited April 19 in Bugs and Errors
I reported a bug before that is unfortunately still present in 2.5.1.

When a video description contains html characters, it can corrupt the description meta tag.

This can be fixed by replacing the following code in lib/View.php


/**
* Write the Additional META tags to the browser
* @return mixed Stored META tags are written to browser
*/
public function writeMeta()
{
$this->addMeta('generator', 'CumulusClips');
if (!empty($this->vars->meta->keywords)) $this->addMeta('keywords', $this->vars->meta->keywords);
if (!empty($this->vars->meta->description)) $this->addMeta('description', $this->vars->meta->description);

if (isset($this->_meta)) {
foreach ($this->_meta as $_value) {
echo $_value, "\n";
}
}
}



/**
* Write the Additional META tags to the browser
* @return mixed Stored META tags are written to browser
*/
public function writeMeta()
{
$this->addMeta('generator', 'CumulusClips');
if (!empty($this->vars->meta->keywords)) $this->addMeta('keywords', $this->vars->meta->keywords);
if (!empty($this->vars->meta->description)) $this->addMeta('description', htmlentities($this->vars->meta->description));

if (isset($this->_meta)) {
foreach ($this->_meta as $_value) {
echo $_value, "\n";
}
}
}
ccmeta1.png
613 x 684 - 33K
ccmeta3.png
928 x 636 - 140K

Comments

This discussion has been closed.