cvs: phpweb /include layout.inc
| From: | jim winstead | Date: | Sun, 28 Oct 2001 18:26:52 +0000 |
| Subject: | cvs: phpweb /include layout.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-7224@lists.php.net to get a copy of this message | ||
jimw Sun Oct 28 13:26:52 2001 EDT
Modified files:
/phpweb/include layout.inc
Log:
don't call wordwrap if it doesn't exist.
Index: phpweb/include/layout.inc
diff -u phpweb/include/layout.inc:1.55 phpweb/include/layout.inc:1.56
--- phpweb/include/layout.inc:1.55 Mon Oct 22 11:56:15 2001
+++ phpweb/include/layout.inc Sun Oct 28 13:26:52 2001
@@ -1,5 +1,5 @@
<?php
-/* $Id: layout.inc,v 1.55 2001/10/22 15:56:15 cmv Exp $ */
+/* $Id: layout.inc,v 1.56 2001/10/28 18:26:52 jimw Exp $ */
# spacer()
# print a IMG tag for a sized spacer GIF
@@ -381,14 +381,17 @@
}
function clean_note($text) {
- $text = htmlspecialchars($text);
+ $text = htmlspecialchars(trim($text));
$fixes = array('<br>','<p>','</p>');
reset($fixes);
while (list(,$f)=each($fixes)) {
$text=str_replace(htmlspecialchars($f), $f, $text);
$text=str_replace(htmlspecialchars(strtoupper($f)), $f, $text);
}
- $text = "<tt>".nl2br(wordwrap(trim($text)))."</tt>";
+ if (function_exists("wordwrap")) {
+ $text = wordwrap($text);
+ }
+ $text = "<tt>".nl2br($text)."</tt>";
return $text;
}