Page MenuHomePhabricator

Shortening only a domain without a trailing slash fails
Closed, DuplicatePublic

Description

Based on the demo at http://urlshortener.wmflabs.org/, trying to shorten just http://en.wikipedia.org does not work - a trailing slash is required.

I'm not sure whether this is meant to be supported, but maybe the regex (?) needs a change?

Event Timeline

polybuildr raised the priority of this task from to Needs Triage.
polybuildr updated the task description. (Show Details)
polybuildr subscribed.
Legoktm added subscribers: ori, Mholloway, Luke081515 and 24 others.

This is because new mw.Uri('https://en.wikipedia.org'); throws an exception: Error: Bad constructor arguments.

This actually works on meta.wikimedia.org, but an error is still generated and the URL is not normalized (see T220718).