Page MenuHomePhabricator

Intro property incorrectly identified in formatted endpoint
Closed, ResolvedPublic

Description

The formatted endpoint identifies the "intro" for an article. It seems this intro is ill-defined to include any element that is not a p
For example:

{
  "intro": "<p>The following is a list of the <b>highest-grossing films in <a href=\"./China\" title=\"China\">China</a></b> (excluding <a href=\"./Hong_Kong\" title=\"Hong Kong\">Hong Kong</a> and <a href=\"./Taiwan\" title=\"Taiwan\">Taiwan</a>), based on data by Entgroup's China Boxoffice (CBO) website with the gross in <a href=\"./Renminbi\" title=\"Renminbi\">yuan</a>.<span class=\"mw-ref\" id=\"cite_ref-1\"><a href=\"./List_of_highest-grossing_films_in_China#cite_note-1\" style=\"counter-reset: mw-Ref 1;\"><span class=\"mw-reflink-text\">[1]</span></a></span></p><div>\n<dl id=\"mwCA\"><dd id=\"mwCQ\"><i>Background colour <span style=\"background-color:#ffff80; color:; border:1px solid #000000; text-align:center;\"><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span></span> indicates films that are currently in cinema</i></dd></dl>\n</div>",
}

Acceptance criteria

  • Intro should exclude div, center and figure elements that follow the first p element.

Event Timeline

Change 379936 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/services/mobileapps@master] Fix definition of lead introduction

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

Change 379936 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Fix definition of lead introduction

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

Jdlrobson claimed this task.