Jackmcbarn has uploaded a new change for review.

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

Change subject: Unstrip any text we add in ParserAfterUnstrip
......................................................................

Unstrip any text we add in ParserAfterUnstrip

Since ParserAfterUnstrip happens after unstripGeneral, we need to run
unstripGeneral on any output we add at that point.

Change-Id: I67056b14c218a58f7d1c07c76beab7124fe860cd
---
M Cite_body.php
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite 
refs/changes/82/214082/1

diff --git a/Cite_body.php b/Cite_body.php
index e5f0a5a..67a6f85 100644
--- a/Cite_body.php
+++ b/Cite_body.php
@@ -981,11 +981,12 @@
                        if ( count( $refs ) == 0 ) {
                                continue;
                        }
+                       // Since this function gets called after the parser 
already did its unstrip, we have to unstrip these ourself
                        if ( $group == self::DEFAULT_GROUP ) {
-                               $text .= $this->referencesFormat( $group, '', 
'' );
+                               $text .= $parser->mStripState->unstripGeneral( 
$this->referencesFormat( $group, '', '' ) );
                        } else {
-                               $text .= "\n<br />" .
-                                       $this->error( 
'cite_error_group_refs_without_references', htmlspecialchars( $group ) );
+                               $text .= $parser->mStripState->unstripGeneral( 
"\n<br />" .
+                                       $this->error( 
'cite_error_group_refs_without_references', htmlspecialchars( $group ) ) );
                        }
                }
                return true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I67056b14c218a58f7d1c07c76beab7124fe860cd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Jackmcbarn <jackmcb...@gmail.com>

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

Reply via email to