diff --git a/h5p.classes.php b/h5p.classes.php index 5784264..6a6fac8 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -1598,6 +1598,16 @@ Class H5PExport { $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. * @@ -1630,7 +1640,7 @@ Class H5PExport { // Build h5p.json, the en-/de-coding will ensure proper escaping $h5pJson = array ( - 'title' => $content['title'], + 'title' => self::revertH5PEditorTextEscape($content['title']), 'language' => (isset($content['language']) && strlen(trim($content['language'])) !== 0) ? $content['language'] : 'und', 'mainLibrary' => $content['library']['name'], 'embedTypes' => $embedTypes