# HG changeset patch # User Dan # Date 1196494789 18000 # Node ID a1ccf990db6ba341b06a04151af8a3ff2da9bb46 # Parent e49604416b5aaa71900c488cc3a34bb799a3f568 Fixed: sanitation loop on ampersands in encodeAttribute() (this was MediaWiki's fault) diff -r e49604416b5a -r a1ccf990db6b includes/wikiengine/Tables.php --- a/includes/wikiengine/Tables.php Sat Dec 01 00:35:42 2007 -0500 +++ b/includes/wikiengine/Tables.php Sat Dec 01 02:39:49 2007 -0500 @@ -277,6 +277,13 @@ * @return HTML-encoded text fragment */ function encodeAttribute( $text ) { + + // In Enano 1.0.3, added this cheapo hack to keep ampersands + // from being double-sanitized. Thanks to markybob from #deluge. + $encValue = strtr( $text, array( + '&' => '&' + ) ); + $encValue = htmlspecialchars( $text ); // Whitespace is normalized during attribute decoding,