]> _ Git - cubeextranet.git/commitdiff
#scorm Better support of javascript: links in html5 version
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 23 Mar 2016 19:03:32 +0000 (19:03 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 23 Mar 2016 19:03:32 +0000 (19:03 +0000)
inc/ws/Util/html5/class.ws.html5.links.php

index 5750e8ae8c71a1ffb0137f6529d151aa4cf01e3d..7e7ac6e8d09bac52b83d796d94761aa117a0c823 100644 (file)
@@ -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;
        }