From 77d589ec6868d834aa3b91ece1cf0c124dbada71 Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Fri, 27 Feb 2015 10:55:47 +0100 Subject: [PATCH] Fixed absolute URLs violating its parent. --- js/h5p.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/h5p.js b/js/h5p.js index 4183e1c..932477e 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -459,7 +459,8 @@ H5P.getPath = function (path, contentId) { } if (!hasProtocol(prefix)) { - prefix = window.parent.location.protocol + "//" + window.parent.location.host + prefix; + // Use absolute urls + prefix = window.location.protocol + "//" + window.location.host + prefix; } return prefix + '/' + path;