Page MenuHomePhabricator

Make ApiMobileView consistently return HTML for the displaytitle property
Closed, ResolvedPublic

Description

Currently, the displaytitle field returns by ApiMobileView may contain HTML or plain text, depending on whether {{DISPLAYTITLE}} was used on the page to override the title. In I043b26b82f I clarified that core *always* stores and returns the display title as HTML. Code that uses displaytitle needs to be aware of this. When falling back from displaytitle to the actual page title, escaping needs to be applied to ensure consistency.

Once ApiMobileView consistently returns HTML for displaytitle (technically a breaking change, though it really just fixes an inconsistency), clients that use this property need to be made aware that this is HTML, to avoid double-escaping.

Event Timeline

daniel created this task.Oct 16 2015, 7:03 PM
daniel updated the task description. (Show Details)
daniel raised the priority of this task from to Needs Triage.
daniel added a subscriber: daniel.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 16 2015, 7:03 PM
daniel updated the task description. (Show Details)Oct 16 2015, 7:05 PM
Florian updated the task description. (Show Details)Oct 16 2015, 7:08 PM

Change 246878 had a related patch set uploaded (by Daniel Kinzler):
Make the API consistently return the displaytitle as HTML.

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

daniel updated the task description. (Show Details)Oct 16 2015, 7:14 PM

If this needs Android attention, it should probably have a separate Android-specific Phab card, so the Android team and get in into their workflow without messing with iOS's.

From the Android side, I think it's sufficient to just Track this issue, since the app already accounts for displaytitle containing HTML. Once this patch is deployed, we'll just need to make sure that it's still behaving properly.

Can someone provide a set of articles using {{DISPLAYTITLE}}`? Would be prudent to see if this affects the existing version(s) of the iOS app.

Jdlrobson triaged this task as Normal priority.Oct 26 2015, 5:10 PM
BGerstle-WMF added a subscriber: Etonkovidova.

@Etonkovidova I'm QA'ing this on the app side since it requires recompiling the app to target the labs instance running this change.

Change 246878 merged by jenkins-bot:
Make the API consistently return the displaytitle as HTML.

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

Let me know asap @BGerstle-WMF if you see any issues with the app against beta labs so they can be dealt with immediately.

Jdlrobson closed this task as Resolved.
Jdlrobson claimed this task.