cvs: php-gtk-web /include layout.php

[email protected] ("Colin Viebrock") Thu, 09 Aug 2001 17:02:19 -0000
Newsgroups php.gtk
Message-ID <cvscmv997376539@cvsserver>
cmv		Thu Aug  9 13:02:19 2001 EDT

  Modified files:              
    /php-gtk-web/include	layout.php 
  Log:
  clean_note() was inside another function ... duh
  
  
  
Index: php-gtk-web/include/layout.php
diff -u php-gtk-web/include/layout.php:1.10 php-gtk-web/include/layout.php:1.11
--- php-gtk-web/include/layout.php:1.10	Thu Aug  9 12:24:15 2001
+++ php-gtk-web/include/layout.php	Thu Aug  9 13:02:17 2001
@@ -1,5 +1,5 @@
 <?php
-/* $Id: layout.php,v 1.10 2001/08/09 16:24:15 cmv Exp $ */
+/* $Id: layout.php,v 1.11 2001/08/09 17:02:17 cmv Exp $ */
 
 
 # spacer()
@@ -297,18 +297,17 @@
 </html>
 <?php
 
-
-function clean_note($text) {
-    $text = htmlspecialchars($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($text)."</tt>";
-    return $text;
 }
 
+
+function clean_note($text) {
+	$text = htmlspecialchars($text);
+	$fixes = array('<br>','<p>','</p>');
+	foreach ($fixes as $f) {
+		$text=str_replace(htmlspecialchars($f), $f, $text);
+		$text=str_replace(htmlspecialchars(strtoupper($f)), $f, $text);
+	}
+	$text = "<tt>".nl2br($text)."</tt>";
+	return $text;
 }