From 16a45f5737c9f026e5ee6088a02971bf8a51b0ac Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Wed, 23 Mar 2016 19:03:32 +0000 Subject: [PATCH] #scorm Better support of javascript: links in html5 version --- inc/ws/Util/html5/class.ws.html5.links.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/inc/ws/Util/html5/class.ws.html5.links.php b/inc/ws/Util/html5/class.ws.html5.links.php index 5750e8ae8..7e7ac6e8d 100644 --- a/inc/ws/Util/html5/class.ws.html5.links.php +++ b/inc/ws/Util/html5/class.ws.html5.links.php @@ -385,12 +385,15 @@ class contentLink extends wsHTML5Link { } class webLink extends normalLink { - public function getURL() { - return wsHTML5Link::getUniversalLocation($this->to); + $res = str_replace('"', '\'', wsHTML5Link::getUniversalLocation($this->to)); + return $res; } public function getTarget() { + if (strpos($this->getURL(), 'javascript:') === 0) { + return '_self'; + } return $this->target; } -- 2.39.5