From 2b8c0a719dbc294d9e20a48230182645788e45ec Mon Sep 17 00:00:00 2001 From: Roly Rudy Gutierrez Pinto Date: Fri, 20 Dec 2013 09:06:25 -0400 Subject: [PATCH] BUG-13626 IMPROVEMENT --- gulliver/system/class.xmlform.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gulliver/system/class.xmlform.php b/gulliver/system/class.xmlform.php index 776fe8f7d..d08f57f43 100755 --- a/gulliver/system/class.xmlform.php +++ b/gulliver/system/class.xmlform.php @@ -2748,7 +2748,11 @@ class XmlForm_Field_Link extends XmlForm_Field $html = "htmlentities($link, ENT_QUOTES, "utf-8") . "\""; $html = $html . " id=\"form[$id]\" name=\"form[$id]\" pm:field=\"pm:field\""; - $html = $html . (($this->onclick)? " onclick=\"" . htmlentities($onclick, ENT_QUOTES, "utf-8") . "\"" : null); + if ((strrpos($_SERVER['HTTP_USER_AGENT'], "Chrome") === false ? false : true) && trim($this->htmlentities($link, ENT_QUOTES, "utf-8")) === "#") { + $html = $html . (($this->onclick) ? " onclick=\"" . htmlentities($onclick, ENT_QUOTES, "utf-8") . " return false;\"" : " onclick=\" return false;\""); + } else { + $html = $html . (($this->onclick) ? " onclick=\"" . htmlentities($onclick, ENT_QUOTES, "utf-8") . "\"" : null); + } $html = $html . (($this->target)? " target=\"" . htmlentities($target, ENT_QUOTES, "utf-8") . "\"" : null); switch ($owner->type) {