Page MenuHomePhabricator

LQT should not give protocol relative URLs when the user click on "Link To"
Closed, ResolvedPublic

Description

I noticed the LQT extension is providing links such as
//pt.wikibooks.org/wiki/...
instead of
http://pt.wikibooks.org/wiki/...
or
https://pt.wikibooks.org/wiki/...

I think it should complete/expand the URL by including the protocol before showing it in the dialog for the user.


Version: unspecified
Severity: normal
URL: https://pt.wikibooks.org/wiki/T%C3%B3pico:Wikilivros:Di%C3%A1logos_comunit%C3%A1rios/Arrastar_para_outro_local

Details

Reference
bz31354

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 11:55 PM
bzimport set Reference to bz31354.
bzimport added a subscriber: Unknown Object (MLST).

How does this actually break for you? If I click "Copy link location" in Firefox, Firefox expands the URL to https:// for me. Are you using a browser that doesn't have this behavior? Is there any other reason why you don't want it to be protocol-relative?

Created attachment 9161
Links provided by LQT

The link I was referring to is the one provided in a popup when the user clicks on "Link To", not the text which would be copied by using the right button of the mouse. See the part marked in red on the attached screenshot.

Since bug 24627 was not fixed yet, and the popup still provides two versions of the link instead of only one which could be copied directly, I believe the user is not supposed to be coping the link by right-clicking on the "Link To", but by using the popup which should have the full link.

The current behavior forces the user to do an additional step (of adding the protocol by hand) if he/she wants to copy the link to an e-mail, since protocol relative links doesn't works (I mean, Gmail for example won't make the "link" string to be converted in a https link: the "" will be left out of the clickable http "link").

Attached:

LQT_links.png (768×1 px, 138 KB)

Right, I didn't know about the popup.

Fixed in r99022 and deployed to 1.18 wikis. Didn't put this in 1.17 because we plan to deploy 1.18 to all wikis in a few hours anyway. ptwikibooks is still on 1.17 so it won't have the fix until it's upgraded. I confirmed the fix at https://www.mediawiki.org/wiki/Project:Current_issues