includes/wikiengine/Tables.php
changeset 458 c433348f3628
parent 411 d1a95497b68f
parent 446 27f5ac58992c
child 507 586fd7d3202d
--- a/includes/wikiengine/Tables.php	Fri Feb 22 12:48:57 2008 -0500
+++ b/includes/wikiengine/Tables.php	Fri Feb 22 12:51:53 2008 -0500
@@ -280,11 +280,24 @@
     
     // In Enano 1.0.3, added this cheapo hack to keep ampersands
     // from being double-sanitized. Thanks to markybob from #deluge.
+    
+    // htmlspecialchars() the "manual" way
     $encValue = strtr( $text, array(
-      '&' => '&'
+      '&'  => '&',
+      '"' => '"',
+      '&lt;'   => '<',
+      '&gt;'   => '>',
+      '&#039;' => "'"
     ) );
     
-		$encValue = htmlspecialchars( $text );
+    $encValue = strtr( $text, array(
+      '&' => '&amp;',
+      '"' => '&quot;',
+      '<' => '&lt;',
+      '>' => '&gt;',
+      "'" => '&#039;'
+    ) );
+    
 		
 		// Whitespace is normalized during attribute decoding,
 		// so if we've been passed non-spaces we must encode them