fix popup to allow newlines in text data

This commit is contained in:
mohrt
2002-12-11 14:51:10 +00:00
parent caa0b572cb
commit a91b21aba3
2 changed files with 2 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ function smarty_function_popup($params, &$smarty)
if (empty($trigger)) { $trigger = "onMouseOver"; } 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 ($sticky) { echo ",STICKY"; }
if (!empty($caption)) { echo ",CAPTION,'".str_replace("'","\'",$caption)."'"; } if (!empty($caption)) { echo ",CAPTION,'".str_replace("'","\'",$caption)."'"; }
if (!empty($fgcolor)) { echo ",FGCOLOR,'$fgcolor'"; } if (!empty($fgcolor)) { echo ",FGCOLOR,'$fgcolor'"; }

View File

@@ -19,7 +19,7 @@ function smarty_function_popup($params, &$smarty)
if (empty($trigger)) { $trigger = "onMouseOver"; } 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 ($sticky) { echo ",STICKY"; }
if (!empty($caption)) { echo ",CAPTION,'".str_replace("'","\'",$caption)."'"; } if (!empty($caption)) { echo ",CAPTION,'".str_replace("'","\'",$caption)."'"; }
if (!empty($fgcolor)) { echo ",FGCOLOR,'$fgcolor'"; } if (!empty($fgcolor)) { echo ",FGCOLOR,'$fgcolor'"; }