Merge branch 'adding-htmlspecialchars-to-h5p' into without-pal
commit
9f19f64bab
|
@ -975,6 +975,13 @@ H5P.setFinished = function (contentId, points, maxPoints) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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, '"');
|
||||||
|
};
|
||||||
|
|
||||||
// Add indexOf to browsers that lack them. (IEs)
|
// Add indexOf to browsers that lack them. (IEs)
|
||||||
if (!Array.prototype.indexOf) {
|
if (!Array.prototype.indexOf) {
|
||||||
Array.prototype.indexOf = function (needle) {
|
Array.prototype.indexOf = function (needle) {
|
||||||
|
|
Loading…
Reference in New Issue