Page MenuHomePhabricator

HTML Email Notifications - Text snippets have weird characters
Closed, ResolvedPublic

Description

HTML-Email-Notification-Weird-Characters-Bug.png

Some HTML Email notifications show weird characters in text snippets for talk page messages.

Here are two examples from recent emails:

•

—

This seems to happen when the original message includes special HTML codes. For example, here is the wiki markup for the first example (&#8226, see attached):

'Testing HTML email notifications. Yay, <font style="font-family:Georgia, serif;">[[User:Steven Walling|Steven Walling]]&nbsp;&bull;&nbsp;[[User talk:Steven Walling|<span style="color: #8080b0">talk</span>]]</font> 20:15, 30 July 2013 (UTC)'

... which caused the HTML Email to display:

'Testing HTML email notifications. Yay, &#8226; ['

So in this case, the weird characters were triggered by this the offending HTML code:

'<font style="font-family:Georgia, serif;">'

My proposed resolution for this issue is to not display in the notification any sentence that includes any such HTML characters -- and just show three dots instead ('...').

This text snippet is only provided as a convenience, as the preceding notification sentence carries all the essential information and links. Most notifications will not have any text snippets, so this is more of an edge case. Therefore, it seems more effective to omit non-essential information that could confuse the user for no good reason.


Version: unspecified
Severity: normal

Attached:

HTML-Email-Notification-Weird-Characters-Bug.png (305×704 px, 29 KB)

Details

Reference
bz52313

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:06 AM
bzimport added a project: Notifications.
bzimport set Reference to bz52313.

Change 77055 had a related patch set uploaded by Bsitu:
(bug 52313) Do not show text snippet with undecoded chars

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

Change 77055 merged by jenkins-bot:
(bug 52313) Do not show text snippet with undecoded chars

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

I tested this on English Wikipedia and it works as intended. If a text snippet has any weird characters, we do not show it at all, as proposed above. We think this is a reasonable solution for now. If needed, we can tweak this some more when we return from Wikimania in mid-August. Thanks, Benny!