Closed Bug 887651 Opened 12 years ago Closed 12 years ago

[SMS] Contact name is double escaped in Notification

Categories

(Firefox OS Graveyard :: Gaia::SMS, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:leo+, b2g18 verified, b2g-v1.1hd fixed)

RESOLVED FIXED
blocking-b2g leo+
Tracking Status
b2g18 --- verified
b2g-v1.1hd --- fixed

People

(Reporter: gnarf, Assigned: oconnore)

Details

Attachments

(2 files)

Attached image screenshot of error
When receiving an SMS from a contact that has <>' or other escaped html characters, the notification will display with &lt;&gt;&apos; etc.
blocking-b2g: leo? → leo+
Assignee: nobody → schung
Assignee: schung → owcarnia
I think the problem is from ... Activity_handler.js , sender = Utils.escapeHTML(contact[0].name[0]);
I've found the same place and this fixes the error. But are we sure contact in all cases is saved with escaped name ?
I think it doesn't matter since we use textContent and not innerHTML to display name.
Attached file Github pull request
Jakub -- contacts are not saved with escaped name. The escaping should be done by the rendering code, which it is in apps/system/js/notifications.js:257. Sorry for dropping the patch in, I forgot to take this and didn't notice it had been assigned.
Assignee: owcarnia → eric
Status: NEW → ASSIGNED
Attachment #768717 - Flags: review?(gnarf37)
Comment on attachment 768717 [details] [review] Github pull request r=me - landing
Attachment #768717 - Flags: review?(gnarf37) → review+
v1.1.0hd: 9c9f1445afadcfd7078311341d35800f696fc90d
Issue longer reproduces in the Leo Build ID: 20130716070204 Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/629020cf576b Gaia: fb9362d34260771d4a00b9a0e10a6bbad397bd3b Platform Version: 18.1 Contact name no longer double escaped in Notification. Result as expected.
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: