Home » HTML » HTML_QuickForm » Bug #2373
autocomplete Element creates unwanted newline at the end of its output
Details
| Request #2373 | autocomplete Element creates unwanted newline at the end of its output |
|---|---|
| Submitted | 2004-09-22 15:35 UTC |
| From | marian at kisd dot de |
| Status | Closed |
| Package | HTML_QuickForm |
| PHP Version | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2004-09-22 15:35 UTC] marian at kisd dot de
Description:
------------
I am getting an obsolete newline character at the end of the autocomplete element (version is $Id: autocomplete.php,v 1.4 2004/06/15 10:51:42 mansion Exp $) which is rendered as a space by Firefox and others. This prevents autocomplete elements from being positioned at the same horizontal position as other elements.
The simple solution is to no ouput the \n char behind </script>.
Thanks!
Reproduce code:
---------------
--- autocomplete.php~ 2004-09-22 17:23:34.000000000 +0200
+++ autocomplete.php 2004-09-22 17:23:34.000000000 +0200
@@ -230,7 +230,7 @@
for ($i = 0; $i < count($this->_options); $i++) {
$js .= $arrayName . '[' . $i . "] = '" . strtr($this->_options[$i], $jsEscape) . "';\n";
}
- $js .= "//]]>\n</script>\n";
+ $js .= "//]]>\n</script>";
}
return $js . parent::toHtml();
}// end func toHtml