From 8e1ec34ae1536dc78599c5f737cc412c8aea7b2f Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Wed, 14 Jan 2015 19:25:21 +0100 Subject: [PATCH] Make Sanitizer::removeHTMLtags() and ::removeHTMLComments public The functions are used in at least 5 extensions in Gerrit, so not private at all. Change-Id: Id6d7b82d7333184ff2b1dcd592a80af30a50a889 --- includes/Sanitizer.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index 6942ac0d1d..f79e94d459 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -355,7 +355,6 @@ class Sanitizer { /** * Cleans up HTML, removes dangerous tags and attributes, and * removes HTML comments - * @private * @param string $text * @param callable $processCallback Callback to do any variable or parameter * replacements in HTML attribute values @@ -364,7 +363,7 @@ class Sanitizer { * @param array $removetags For any tags (default or extra) to exclude * @return string */ - static function removeHTMLtags( $text, $processCallback = null, + public static function removeHTMLtags( $text, $processCallback = null, $args = array(), $extratags = array(), $removetags = array() ) { global $wgUseTidy, $wgAllowMicrodataAttributes, $wgAllowImageTag; @@ -607,11 +606,10 @@ class Sanitizer { * and followed by a newline (ignoring spaces), trim leading and * trailing spaces and one of the newlines. * - * @private * @param string $text * @return string */ - static function removeHTMLcomments( $text ) { + public static function removeHTMLcomments( $text ) { while ( ( $start = strpos( $text, '', $start + 4 ); if ( $end === false ) { -- 2.20.1