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?
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?
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Duplicate | None | T108565 Shortening only a domain without a trailing slash fails | |||
Resolved | Krinkle | T103379 Add 'url' module for native URL constructor (with conditionally loaded polyfill) |
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).