From 5efa19cf966267afaf3c0dc0ccdcd02575494bcf Mon Sep 17 00:00:00 2001 From: mohrt Date: Wed, 15 Dec 2004 20:42:05 +0000 Subject: [PATCH] fix invalid HTML issue with popup --- NEWS | 2 ++ libs/plugins/function.popup.php | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 33467aa4..d09db65a 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ + - fix invalid HTML issue with popup (Stefanos Harhalakis, + Monte) - fixed {popup} to properly handle inarray and function parameters and added support for mouseoff and followmouse options (boots) diff --git a/libs/plugins/function.popup.php b/libs/plugins/function.popup.php index 40e1eef3..2ba54de5 100644 --- a/libs/plugins/function.popup.php +++ b/libs/plugins/function.popup.php @@ -104,7 +104,10 @@ function smarty_function_popup($params, &$smarty) if (empty($trigger)) { $trigger = "onmouseover"; } $retval = $trigger . '="return overlib(\''.preg_replace(array("!'!","![\r\n]!"),array("\'",'\r'),$text).'\''; - $retval .= $append . ');" onmouseout="nd();"'; + $retval .= $append . ');"'; + if ($trigger == 'onmouseover') + $retval .= ' onmouseout="nd();"'; + return $retval; }