jenkins-bot has submitted this change and it was merged.

Change subject: Fixup: MathRendering in search results
......................................................................


Fixup: MathRendering in search results

CirrusSearch uses different quotation compared to core

Change-Id: I492ca7c9a289a0eb5216e6b332d6bf2e8c840353
---
M Math.hooks.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Physikerwelt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Math.hooks.php b/Math.hooks.php
index d899741..203f507 100644
--- a/Math.hooks.php
+++ b/Math.hooks.php
@@ -338,8 +338,8 @@
                        if ( substr( $fullElement, - 7 ) == '</math>' ) { // 
only full elements
                                $logger = MWLoggerFactory::getInstance( 'Math' 
);
                                $content = self::escapeHtmlTags( 
$unescapedContent );
-                               // remove span highlighting
-                               $content = str_replace( '<span 
class="searchmatch">', '', $content );
+                               // remove span highlighting (CirrusSearch uses 
different quotation compared to core)
+                               $content = preg_replace( '/<span 
class=[\'"]searchmatch[\'"]>/', '', $content );
                                $content = str_replace( '</span>', '', $content 
);
                                // unescape backslash
                                $content = str_replace( "\\\\", "\\", $content 
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I492ca7c9a289a0eb5216e6b332d6bf2e8c840353
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: develop
Gerrit-Owner: Physikerwelt <[email protected]>
Gerrit-Reviewer: Physikerwelt <[email protected]>
Gerrit-Reviewer: TheDJ <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to