mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
fix popup to allow newlines in text data
This commit is contained in:
@@ -19,7 +19,7 @@ function smarty_function_popup($params, &$smarty)
|
||||
|
||||
if (empty($trigger)) { $trigger = "onMouseOver"; }
|
||||
|
||||
echo $trigger.'="return overlib(\''.str_replace("'","\'",$text).'\'';
|
||||
echo $trigger.'="return overlib(\''.preg_replace(array("!'!","![\r\n]+!"),array("\'",'\r'),$text).'\'';
|
||||
if ($sticky) { echo ",STICKY"; }
|
||||
if (!empty($caption)) { echo ",CAPTION,'".str_replace("'","\'",$caption)."'"; }
|
||||
if (!empty($fgcolor)) { echo ",FGCOLOR,'$fgcolor'"; }
|
||||
|
@@ -19,7 +19,7 @@ function smarty_function_popup($params, &$smarty)
|
||||
|
||||
if (empty($trigger)) { $trigger = "onMouseOver"; }
|
||||
|
||||
echo $trigger.'="return overlib(\''.str_replace("'","\'",$text).'\'';
|
||||
echo $trigger.'="return overlib(\''.preg_replace(array("!'!","![\r\n]+!"),array("\'",'\r'),$text).'\'';
|
||||
if ($sticky) { echo ",STICKY"; }
|
||||
if (!empty($caption)) { echo ",CAPTION,'".str_replace("'","\'",$caption)."'"; }
|
||||
if (!empty($fgcolor)) { echo ",FGCOLOR,'$fgcolor'"; }
|
||||
|
Reference in New Issue
Block a user