Page MenuHomePhabricator

AddMediaInfo pass isn't robust to link-in-link
Closed, ResolvedPublic

Description

For example, both inline

> [http://www.google.com [[File:Test.jpg|123]]]

TypeError: Cannot read property 'firstChild' of null
    at containers.filter (~/services/parsoid/lib/wt2html/pp/processors/AddMediaInfo.js:586:23)

and block break,

> [http://www.google.com [[File:Test.jpg|thumb|123]]]

TypeError: Cannot read property 'nodeName' of null
    at containers.filter (~/services/parsoid/lib/wt2html/pp/processors/AddMediaInfo.js:586:34)

Event Timeline

Arlolra created this task.Feb 11 2019, 5:33 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 11 2019, 5:33 PM

http://localhost:8000/nl.wikipedia.org/v3/page/html/De_Meern/53147456 give this example,

== Externe link ==
*[http://api.commissiemer.nl/docs/mer/p23/p2331/2331-035cultuurhistorie_001.pdf {{pdf}} Polder Rijnenburg - Cultuurhistorische landschapsanalyse (2007) - commissiemer.nl]

TypeError: Cannot read property 'firstChild' of null
    at containers.filter (~/services/parsoid/lib/wt2html/pp/processors/AddMediaInfo.js:586:23)
Arlolra updated the task description. (Show Details)Feb 11 2019, 6:23 PM
Arlolra triaged this task as Normal priority.Feb 11 2019, 10:42 PM

Change 489915 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] Fix crashers from file in link scenarios

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

Change 489915 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Fix crashers from file in link scenarios

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

Arlolra closed this task as Resolved.Feb 12 2019, 12:22 AM