MarkAHershberger has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379151 )
Change subject: Provide base href in Echo's HTML emails ...................................................................... Provide base href in Echo's HTML emails While working on my own Echo notifications for CategoryWatch, I came across this bug. I was happy to see that someone else identified this a while back. Wikitext-to-html production for the body of Echo messages does not fully qualify urls. This means that links are created pointing to, for example, "/w/index.php..." instead of "http://example.com/w/index.php". Supplying a base URL in the html for the message fixes this problem. Bug: T141521 Change-Id: Icfb9f3be58b83d2a441972adb58fef1169169d7c --- M includes/formatters/EchoHtmlEmailFormatter.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/51/379151/1 diff --git a/includes/formatters/EchoHtmlEmailFormatter.php b/includes/formatters/EchoHtmlEmailFormatter.php index 5cf41cd..b1aae7d 100644 --- a/includes/formatters/EchoHtmlEmailFormatter.php +++ b/includes/formatters/EchoHtmlEmailFormatter.php @@ -51,6 +51,7 @@ $iconImgSrc = Sanitizer::encodeAttribute( $emailIcon ); + global $wgServer; return <<< EOF <html><head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> @@ -60,6 +61,7 @@ table[id="email-container"]{max-width:600px !important; width:100% !important;} } </style> + <base href="{$wgServer}"> </head><body> <table cellspacing="0" cellpadding="0" border="0" width="100%" align="center" lang="{$langCode}" dir="{$langDir}"> <tr> -- To view, visit https://gerrit.wikimedia.org/r/379151 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icfb9f3be58b83d2a441972adb58fef1169169d7c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: MarkAHershberger <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
