Page MenuHomePhabricator

When the user adds an internal link that looks like a URL, MediaWiki needs to insert a ':' prefix for it to work
Open, MediumPublicFeature

Description

Steps to reproduce:

  1. Open VisualEditor and select a word.
  1. Press Command-K to open the link inspector.
  1. We're going to make an external link to http://www.example.com so start typing: h-t-t-p-:-/-/-w-w-w-
  1. Why is it trying to find an internal page for the URL I'm typing?

If you're obviously typing in a URL, the search feature should be disabled. Offering to make a link to the "local page" http://www.example.com risks broken links like this: https://en.wikipedia.org/w/index.phpdiff=621124784&oldid=620566012


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=44011

Details

Reference
bz69500

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:45 AM
bzimport set Reference to bz69500.

Interesting that MediaWiki allows you to create pages that are URLs, but you can't link to them...

Bug 44011 sounds slightly related

Interesting that MediaWiki allows you to create pages that are URLs, but you can't link to them...

Sorry - it turns out you can link to internal pages named like URLs in MediaWiki, but you have to use the ':' prefix.

Krenair renamed this task from VisualEditor: Searching for a page name that starts with http://whatever... is kind of silly to VisualEditor: When inserting valid internal links that look like URLs, we need to use the ':' prefix.Dec 2 2014, 9:07 PM
Krenair set Security to None.
Jdforrester-WMF renamed this task from VisualEditor: When inserting valid internal links that look like URLs, we need to use the ':' prefix to When the user adds an internal link that looks like a URL, Parsoid needs to insert a ':' prefix for it to work.Dec 2 2014, 9:21 PM
Jdforrester-WMF added a project: Parsoid.
Jdforrester-WMF moved this task from To Triage to Freezer on the VisualEditor board.
Krenair renamed this task from When the user adds an internal link that looks like a URL, Parsoid needs to insert a ':' prefix for it to work to When the user adds an internal link that looks like a URL, MediaWiki needs to insert a ':' prefix for it to work.Dec 2 2014, 9:26 PM
Pols12 subscribed.

About external links detection, it now works well.

About links to pages with URL-like names, VE adds ./ instead of : to prefix the page name, even if you manually set a colon before the URL. By the way, prefixing colon seems to don’t be required.

Since VE preview is fine, I think this is a Parsoid issue, that’s why I re-add Parsoid project for a new review (sorry if I’m wrong).

Related: T222082: Remove "internal" and "external" tabs from the link inspector.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 12:23 PM
Aklapper removed subscribers: rmoen, TrevorParscal.