Physikerwelt has uploaded a new change for review.
https://gerrit.wikimedia.org/r/197768
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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math
refs/changes/68/197768/1
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: newchange
Gerrit-Change-Id: I492ca7c9a289a0eb5216e6b332d6bf2e8c840353
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: develop
Gerrit-Owner: Physikerwelt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits