Page MenuHomePhabricator

Parsoid unable to parse news:// like URLs
Closed, ResolvedPublic

Description

Following wiki code:
[news://comp.lang.apl my_newsgroup]

... should generates something like:
<a rel="nofollow" class="external text" href="news://comp.lang.apl">my_newsgroup</a>

... but generates:
<a rel="mw:ExtLink" data-parsoid='{"targetOff":22,"a":{"href":null},"sa":{"href":"news://comp.lang.apl"},"dsr":[0,35,22,1]}'>my_newsgroup</a>

so, without "href" attribute to the "a" node.


Version: unspecified
Severity: trivial

Details

Reference
bz51100

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:08 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz51100.

This is a bug in our Sanitizer. sanitizeHref uses a constant list of URL protocols rather than the list of allowed protocols from WikiConfig.

Change 73374 had a related patch set uploaded by GWicke:
Bug 51100: Use wiki-specific protocol regexp in sanitizer

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

Change 73374 merged by jenkins-bot:
Bug 51100: Use wiki-specific protocol regexp in sanitizer

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