From d9c39caf7e149f2d530a6aa342a7621d26a46e14 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Mon, 15 Mar 2010 17:17:33 +0000 Subject: [PATCH] removing possible CR/LF from content for ajax search result javascript, as it breaks the options --- etemplate/inc/class.link_widget.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/etemplate/inc/class.link_widget.inc.php b/etemplate/inc/class.link_widget.inc.php index a8798b4ccf..4ab2f255ce 100644 --- a/etemplate/inc/class.link_widget.inc.php +++ b/etemplate/inc/class.link_widget.inc.php @@ -698,6 +698,7 @@ class link_widget foreach($found as $id => $option) { if (!is_array($option)) $option = array('label' => $option); + $option['label'] = str_replace(array("\r","\n"),array(" "," "),$option['label']); $script .= "opt = select.options[select.options.length] = new Option('".addslashes($option['label'])."','".addslashes($id)."');\n"; if (count($option) > 1) {