Merge branch 'master' of github.com:h5p/h5p-php-library
commit
48dd1333a8
|
@ -1526,7 +1526,7 @@ class H5PCore {
|
||||||
|
|
||||||
public static $coreApi = array(
|
public static $coreApi = array(
|
||||||
'majorVersion' => 1,
|
'majorVersion' => 1,
|
||||||
'minorVersion' => 3
|
'minorVersion' => 4
|
||||||
);
|
);
|
||||||
public static $styles = array(
|
public static $styles = array(
|
||||||
'styles/h5p.css',
|
'styles/h5p.css',
|
||||||
|
@ -1648,6 +1648,9 @@ class H5PCore {
|
||||||
|
|
||||||
// Update content dependencies.
|
// Update content dependencies.
|
||||||
$content['dependencies'] = $validator->getDependencies();
|
$content['dependencies'] = $validator->getDependencies();
|
||||||
|
|
||||||
|
// Sometimes the parameters are filtered before content has been created
|
||||||
|
if ($content['id']) {
|
||||||
$this->h5pF->deleteLibraryUsage($content['id']);
|
$this->h5pF->deleteLibraryUsage($content['id']);
|
||||||
$this->h5pF->saveLibraryUsage($content['id'], $content['dependencies']);
|
$this->h5pF->saveLibraryUsage($content['id'], $content['dependencies']);
|
||||||
|
|
||||||
|
@ -1661,6 +1664,7 @@ class H5PCore {
|
||||||
|
|
||||||
// Cache.
|
// Cache.
|
||||||
$this->h5pF->setFilteredParameters($content['id'], $params);
|
$this->h5pF->setFilteredParameters($content['id'], $params);
|
||||||
|
}
|
||||||
return $params;
|
return $params;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1099,3 +1099,10 @@ if (H5P.jQuery) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mimics how php's htmlspecialchars works (the way we use it)
|
||||||
|
*/
|
||||||
|
H5P.htmlSpecialChars = function(string) {
|
||||||
|
return string.toString().replace(/</g, '<').replace(/>/g, '>').replace(/'/g, ''').replace(/"/g, '"');
|
||||||
|
};
|
Loading…
Reference in New Issue