jenkins-bot has submitted this change and it was merged.
Change subject: Expand URLs of icon and actions in HTML email formatter
......................................................................
Expand URLs of icon and actions in HTML email formatter
The plain text email formatter already does this.
Bug: T135625
Change-Id: I630b49ef59988744fa0f89af62655f879e34a6fb
(cherry picked from commit 224caaf0725d31382875e4ad2f972caefb6c4b98)
---
M includes/formatters/EchoHtmlDigestEmailFormatter.php
M includes/formatters/EchoHtmlEmailFormatter.php
2 files changed, 9 insertions(+), 3 deletions(-)
Approvals:
Catrope: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/formatters/EchoHtmlDigestEmailFormatter.php
b/includes/formatters/EchoHtmlDigestEmailFormatter.php
index 93543ce..77895d0 100644
--- a/includes/formatters/EchoHtmlDigestEmailFormatter.php
+++ b/includes/formatters/EchoHtmlDigestEmailFormatter.php
@@ -174,7 +174,10 @@
* @return string
*/
protected function applyStyleToEvent( EchoEventPresentationModel $model
) {
- $iconUrl = EchoNotificationFormatter::getIconUrl(
$model->getIconType(), $this->language->getDir() );
+ $iconUrl = wfExpandUrl(
+ EchoNotificationFormatter::getIconUrl(
$model->getIconType(), $this->language->getDir() ),
+ PROTO_CANONICAL
+ );
$imgSrc = Sanitizer::encodeAttribute( $iconUrl );
// notification text
diff --git a/includes/formatters/EchoHtmlEmailFormatter.php
b/includes/formatters/EchoHtmlEmailFormatter.php
index 3c4e4d2..c97c217 100644
--- a/includes/formatters/EchoHtmlEmailFormatter.php
+++ b/includes/formatters/EchoHtmlEmailFormatter.php
@@ -25,7 +25,10 @@
$actions[] = $this->renderLink( $secondaryLink,
self::SECONDARY_LINK_STYLE );
}
- $iconUrl = EchoNotificationFormatter::getIconUrl(
$model->getIconType(), $this->language->getDir() );
+ $iconUrl = wfExpandUrl(
+ EchoNotificationFormatter::getIconUrl(
$model->getIconType(), $this->language->getDir() ),
+ PROTO_CANONICAL
+ );
$body = $this->renderBody(
$this->language,
@@ -135,7 +138,7 @@
return Html::element(
'a',
array(
- 'href' => $link['url'],
+ 'href' => wfExpandUrl( $link['url'],
PROTO_CANONICAL ),
'style' => $style,
),
$link['label']
--
To view, visit https://gerrit.wikimedia.org/r/289503
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I630b49ef59988744fa0f89af62655f879e34a6fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.28.0-wmf.2
Gerrit-Owner: Mattflaschen <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Sbisson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits