cvs: phpweb /include layout.inc
| From: | James Cox | Date: | Fri, 16 Aug 2002 18:36:35 +0000 |
| Subject: | cvs: phpweb /include layout.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-12002@lists.php.net to get a copy of this message | ||
imajes Fri Aug 16 14:36:35 2002 EDT
Modified files:
/phpweb/include layout.inc
Log:
stop using pre -- doesn't do linewrapping very well
Index: phpweb/include/layout.inc
diff -u phpweb/include/layout.inc:1.96 phpweb/include/layout.inc:1.97
--- phpweb/include/layout.inc:1.96 Tue Aug 13 08:44:53 2002
+++ phpweb/include/layout.inc Fri Aug 16 14:36:34 2002
@@ -1,5 +1,5 @@
<?php
-/* $Id: layout.inc,v 1.96 2002/08/13 12:44:53 goba Exp $ */
+/* $Id: layout.inc,v 1.97 2002/08/16 18:36:34 imajes Exp $ */
# spacer()
# print a IMG tag for a sized spacer GIF
@@ -372,12 +372,15 @@
$text=str_replace(htmlspecialchars(strtoupper($f)), $f, $text);
}
+ /* preserve linebreaks */
+ $text = str_replace("\n", "<br>", $text);
+
/* this will only break long lines */
if (function_exists("wordwrap")) {
$text = wordwrap($text);
}
- $text = "<pre class=\"note\">".$text."</pre>";
+ $text = "<p class=\"note\">".$text."</p>";
return $text;
}