Merge branch 'master' of github.com:h5p/h5p-php-library

namespaces wp-1.2.1
Frode Petterson 2014-11-03 11:30:42 +01:00
commit 2727c1eb2d
2 changed files with 3 additions and 10 deletions

View File

@ -1526,7 +1526,7 @@ class H5PCore {
public static $coreApi = array(
'majorVersion' => 1,
'minorVersion' => 4
'minorVersion' => 3
);
public static $styles = array(
'styles/h5p.css',
@ -2188,7 +2188,7 @@ class H5PCore {
$platformInfo['uuid'] = $this->h5pF->getOption('h5p_site_uuid', '');
// Adding random string to GET to be sure nothing is cached
$random = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 5);
$json = $this->h5pF->fetchExternalData('http://h5p.lvh.me/h5p.org/libraries-metadata.json?api=1&platform=' . urlencode(json_encode($platformInfo)) . '&x=' . urlencode($random));
$json = $this->h5pF->fetchExternalData('http://h5p.org/libraries-metadata.json?api=1&platform=' . urlencode(json_encode($platformInfo)) . '&x=' . urlencode($random));
if ($json !== NULL) {
$json = json_decode($json);
if (isset($json->libraries)) {

View File

@ -1099,10 +1099,3 @@ if (H5P.jQuery) {
}
});
}
/**
* Mimics how php's htmlspecialchars works (the way we use it)
*/
H5P.htmlSpecialChars = function(string) {
return string.toString().replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/'/g, '&#039;').replace(/"/g, '&quot;');
};