From b9249de4911343aa6eac1ff99d92eeaee05855a3 Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Sat, 23 May 2009 02:24:54 +0000 Subject: [PATCH] * Follow-up to r49720: Fix array logic in Sanitizer::removeHTMLtags so that it doesn't strip good tags that were redundantly defined (per brion's CodeReview comment on that rev). * Remove some trailing spaces --- RELEASE-NOTES | 4 +++- includes/Sanitizer.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index e4ae1f9533..c4a4a12a01 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -60,7 +60,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 18411) The upload form also checks post_max_size * Watchlist now has a specialized
tag that contains a unique class for each page * Added Minguo calendar support for the Taiwan Chinese language -* Database: unionQueries function to be used for UNION sql construction, so +* Database: unionQueries function to be used for UNION sql construction, so it can be overloaded on DB abstraction level for DB specific functionality * (bug 18849) Implement Japanese and North Korean calendars * (bug 5755) Introduce {{CURRENTMONTH1}} and {{LOCALMONTH1}} to display the @@ -144,6 +144,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 18522) Wrap MediaWiki:Protect-cascadeon in a div for identification * (bug 18438) Tweak HTML for preview bar for consistency and accessibility * (bug 18432) Updated documentation for dumpBackup.php +* Fix array logic in Sanitizer::removeHTMLtags so that it doesn't strip good tags + that were redundantly defined. == API changes in 1.16 == diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index 304947af7c..47259fb5b3 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -394,7 +394,7 @@ class Sanitizer { $extratags = array_flip( $extratags ); $removetags = array_flip( $removetags ); $htmlpairs = array_merge( $extratags, $htmlpairsStatic ); - $htmlelements = array_diff( array_unique( array_merge( $extratags, $htmlelementsStatic ) ), $removetags ); + $htmlelements = array_diff_key( array_merge( $extratags, $htmlelementsStatic ) , $removetags ); # Remove HTML comments $text = Sanitizer::removeHTMLcomments( $text ); -- 2.20.1