Page MenuHomePhabricator

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


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 raised the priority of this task from to Needs Triage.
daniel updated the task description. (Show Details)
daniel added a subscriber: daniel.

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

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 Medium 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.

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