Some external links are incorrectly dropped during serialization
Open, NormalPublic0 Story Points

Description

Steps to reproduce:

  1. Type some text and add this link: https://tools.wmflabs.org/pageviews/#project=en.wikipedia.org&platform=all-access&agent=all-agents&range=last-month&pages=Wikipedia:VisualEditor|Wikipedia:VisualEditor/User_guide
  1. See that the link has been added:

  1. Save the page and see that the link has silently disappeared:

At Meta, in Safari 9/Mac OS 10.10.5

Restricted Application added a project: VisualEditor. · View Herald TranscriptApr 6 2016, 7:08 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Esanders renamed this task from External link erased when I saved the page to External links with pipe "|" are dropped by Parsoid.
ssastry added a subscriber: ssastry.Apr 8 2016, 4:52 PM
[subbu@earth mwvagrant] parse.js --html2wt < /tmp/html
[error/html2wt/link][enwiki/Main Page] Bad title text <a href="https://tools.wmflabs.org/pageviews/#project=en.wikipedia.org&amp;platform=all-access&amp;agent=all-agents&amp;range=last-month&amp;pages=Wikipedia:VisualEditor|Wikipedia:VisualEditor/User_guide">foobar</a>
Stack:
  /home/subbu/work/wmf/parsoid/lib/html2wt/LinkHandler.js:507:14
  tryCatch1 (/home/subbu/work/wmf/deploy/node_modules/babybird/lib/promise.js:40:12)
  promiseReactionJob (/home/subbu/work/wmf/deploy/node_modules/babybird/lib/promise.js:269:19)
  PromiseReactionJobTask.call (/home/subbu/work/wmf/deploy/node_modules/babybird/lib/promise.js:284:3)
  flush (/home/subbu/work/wmf/deploy/node_modules/babybird/node_modules/asap/raw.js:50:29)
  process._tickCallback (node.js:415:13)
foobar

Looks like some test / regexp for whether the link should be serialized as a wikilink / extlink is broken ... it tries to serialize it as a wikilink for some weird reason and encounters a bad title text error.

@Esanders, I don't think it is related to a pipe

[subbu@earth mwvagrant] echo '<a href="https://google.com?query=x|y">foo</a>' | parse.js --html2wt
[https://google.com?query=x|y foo]
ssastry renamed this task from External links with pipe "|" are dropped by Parsoid to Some external links are incorrectly dropped during serialization.Apr 8 2016, 4:54 PM
Jdforrester-WMF triaged this task as Normal priority.Apr 12 2016, 7:15 PM
Jdforrester-WMF set the point value for this task to 0.
Jdforrester-WMF moved this task from To Triage to TR0: Interrupt on the VisualEditor board.
ssastry moved this task from Backlog to Links on the Parsoid board.Sep 18 2017, 5:16 PM