From: vincent@cubedesigners.com Date: Wed, 23 Mar 2016 19:03:32 +0000 (+0000) Subject: #scorm Better support of javascript: links in html5 version X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=16a45f5737c9f026e5ee6088a02971bf8a51b0ac;p=cubeextranet.git #scorm Better support of javascript: links in html5 version --- 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; }