From 0692f639bc3e33ac56670e8b6d27fb2c46e12292 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Wed, 17 Jan 2007 22:06:32 +0000 Subject: [PATCH] Ignore self closing on closing tags ( '' now gives '') Fix parsertest "Don't fall for the self-closing div" --- RELEASE-NOTES | 1 + includes/Sanitizer.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a7a481eb4f..738606c0a2 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -116,6 +116,7 @@ lighter making things easier to read. * parserTests.php : removed the 'light' option for --color argument, replacing it with a new global switch : $wgCommandLineDarkBg * Sanitizer now correctly escapes lonely '>' occuring before the first wikitag. +* Ignore self closing on closing tags ( '' now gives '') == Languages updated == diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index ebe9d5a80a..73d723efec 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -476,7 +476,7 @@ class Sanitizer { } if ( ! $badtag ) { $rest = str_replace( '>', '>', $rest ); - $close = ( $brace == '/>' ) ? ' /' : ''; + $close = ( $brace == '/>' && !$slash ) ? ' /' : ''; $text .= "<$slash$t$newparams$close>$rest"; continue; } -- 2.20.1