Awight has uploaded a new change for review.

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

Change subject: Detect fancy new curved angle brackets.
......................................................................

Detect fancy new curved angle brackets.

Word on the street is that we've switched the character in order to avoid HTML
escaping "<>".

This won't solve the problem but will throw exceptions that should make it
easier to track down the root cause.  The exception will cause a wfDebugLog
in SpecialBannerLoader, into the "CentralNotice" bucket.

Bug: T144952
Change-Id: I974285063b01e4f014c4945753f2358811bd86d1
---
M includes/BannerRenderer.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice 
refs/changes/74/312074/1

diff --git a/includes/BannerRenderer.php b/includes/BannerRenderer.php
index 08a7c33..0919aae 100644
--- a/includes/BannerRenderer.php
+++ b/includes/BannerRenderer.php
@@ -133,7 +133,9 @@
 
                $bannerKey = $this->banner->getDbKey();
                $bannerHtml = $this->context->msg( $bannerKey )->inLanguage( 
$parentLang )->text();
-               if ( $bannerHtml === "<$bannerKey>" ) {
+               if ( $bannerHtml === "<{$bannerKey}>"
+                       || $bannerHtml === "\u29fc{$bannerKey}\u29fd"
+               ) {
                        // Translation subsystem failure
                        throw new RuntimeException(
                                "Banner message key $bannerKey could not be 
found in {$parentLang->getCode()}"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I974285063b01e4f014c4945753f2358811bd86d1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Awight <awi...@wikimedia.org>

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

Reply via email to