From: Siebrand Mazeland Date: Wed, 14 Jan 2015 18:25:21 +0000 (+0100) Subject: Make Sanitizer::removeHTMLtags() and ::removeHTMLComments public X-Git-Tag: 1.31.0-rc.0~12588 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=8e1ec34ae1536dc78599c5f737cc412c8aea7b2f;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 ) {