Abhinand has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/232723

Change subject: Add unicode support for wikitext
......................................................................

Add unicode support for wikitext

Due to the issues with half of unicode characters appearing in preview text,
substr is changed to mb_substr.

Bug: T108543
Change-Id: Ic91231fb3c4b5d6d62bfa0a1ef9e2d97fa421176
---
M api/SmiteSpamApiQuery.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SmiteSpam 
refs/changes/23/232723/1

diff --git a/api/SmiteSpamApiQuery.php b/api/SmiteSpamApiQuery.php
index f421195..99c4b89 100644
--- a/api/SmiteSpamApiQuery.php
+++ b/api/SmiteSpamApiQuery.php
@@ -65,7 +65,7 @@
                        }
 
                        $previewText = Sanitizer::escapeHtmlAllowEntities(
-                               substr( $page->getMetadata( 'content' ), 0, 50 )
+                               mb_substr( $page->getMetadata( 'content' ), 0, 
50,)
                        );
 
                        if ( strlen( $page->getMetadata( 'content' ) ) > 50  ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic91231fb3c4b5d6d62bfa0a1ef9e2d97fa421176
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SmiteSpam
Gerrit-Branch: master
Gerrit-Owner: Abhinand <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to