Fix h5p.json title field htmlencoded
parent
9081ca3128
commit
06985cca7c
|
@ -1598,6 +1598,16 @@ Class H5PExport {
|
||||||
$this->h5pC = $H5PCore;
|
$this->h5pC = $H5PCore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverts the replace pattern used by the text editor
|
||||||
|
*
|
||||||
|
* @param string $value
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private static function revertH5PEditorTextEscape($value) {
|
||||||
|
return str_replace('<', '<', str_replace('>', '>', str_replace(''', "'", str_replace('"', '"', $value))));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return path to h5p package.
|
* Return path to h5p package.
|
||||||
*
|
*
|
||||||
|
@ -1630,7 +1640,7 @@ Class H5PExport {
|
||||||
|
|
||||||
// Build h5p.json, the en-/de-coding will ensure proper escaping
|
// Build h5p.json, the en-/de-coding will ensure proper escaping
|
||||||
$h5pJson = array (
|
$h5pJson = array (
|
||||||
'title' => $content['title'],
|
'title' => self::revertH5PEditorTextEscape($content['title']),
|
||||||
'language' => (isset($content['language']) && strlen(trim($content['language'])) !== 0) ? $content['language'] : 'und',
|
'language' => (isset($content['language']) && strlen(trim($content['language'])) !== 0) ? $content['language'] : 'und',
|
||||||
'mainLibrary' => $content['library']['name'],
|
'mainLibrary' => $content['library']['name'],
|
||||||
'embedTypes' => $embedTypes
|
'embedTypes' => $embedTypes
|
||||||
|
|
Loading…
Reference in New Issue