diff -r 4e26d6079910 -r 27f5ac58992c includes/wikiengine/Tables.php --- a/includes/wikiengine/Tables.php Wed Jan 09 22:23:09 2008 -0500 +++ b/includes/wikiengine/Tables.php Fri Jan 18 10:35:33 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( - '&' => '&' + '&' => '&', + '"' => '"', + '<' => '<', + '>' => '>', + ''' => "'" ) ); - $encValue = htmlspecialchars( $text ); + $encValue = strtr( $text, array( + '&' => '&', + '"' => '"', + '<' => '<', + '>' => '>', + "'" => ''' + ) ); + // Whitespace is normalized during attribute decoding, // so if we've been passed non-spaces we must encode them