Page MenuHomePhabricator

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


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



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

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