MtDu has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330725 )

Change subject: Migrate away from UtfNormal in core to external UtfNormal 
library
......................................................................

Migrate away from UtfNormal in core to external UtfNormal library

In MediaWiki version 1.25, the UtfNormal library was split into a separate 
wikimedia/utfnormal package.
This patch changes the code to reflect this change.

Bug: T153994
Change-Id: Ideff34ca76fff35100d820ccad83e027c0864881
---
M AbstractFilter.php
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ActiveAbstract 
refs/changes/25/330725/1

diff --git a/AbstractFilter.php b/AbstractFilter.php
index 78b2466..3782569 100644
--- a/AbstractFilter.php
+++ b/AbstractFilter.php
@@ -15,6 +15,8 @@
  *   --filter=abstract:variant=zh-cn
  */
 
+use UtfNormal\Validator;
+
 /**
  * Tosses away the MediaWiki XML and generates new output
  */
@@ -120,7 +122,7 @@
                $extract = $this->extractStart( $stripped );
                $clipped = substr( $extract, 0, 1024 ); // not too long pls
 
-               return UtfNormal::cleanUp( $clipped );
+               return Validator::cleanUp( $clipped );
        }
 
        /**
@@ -222,7 +224,7 @@
                for ( $i = 1; $i < $secsCount; $i += 2 ) {
                        $inside = preg_replace( '/^=+\s*(.*?)\s*=+/', '$1', 
$secs[$i] );
                        $stripped = $this->stripMarkup( $inside ); // strip 
internal markup and <h[1-6]>
-                       $header = UtfNormal::cleanUp( $stripped );
+                       $header = Validator::cleanUp( $stripped );
                        $anchor = $wgParser->guessSectionNameFromWikiText( 
$header );
                        $url = $this->title->getCanonicalUrl() . $anchor;
                        $headers[$header] = $url;

-- 
To view, visit https://gerrit.wikimedia.org/r/330725
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ideff34ca76fff35100d820ccad83e027c0864881
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ActiveAbstract
Gerrit-Branch: master
Gerrit-Owner: MtDu <justin.d...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to