URLs containing quotation marks create broken links, and VisualEditor should fix them
Closed, InvalidPublic

Description

Current situation:

  • Paste something like https://www.google.com/search?q="test+Google+search" into one of the old wikitext editors.
  • Oh, right, the quotation marks. Where's that page that explains how to fix the quotation marks...
  • Never mind. I shouldn't have to look up ASCII codes to put a link on the page. VisualEditor ought to do that magic for me. Open VisualEditor (visual mode).
  • Paste in the URL.
  • That didn't work either! Argh!
  • Okay, let's do this the serious way: Open the link dialog, paste the URL in the box, insert the link, get the link marked as [1], which is not what I want, open the link dialog *again*, and click 'add a label' to get rid of the [1] and just have the plain link.
  • Finally! It worked! (See picture.)
  • Save the page.
  • Arrggghghhh! (See picture.)

It looks like it's worked just before saving:

But the saved page is just as broken as the link would be in the old wikitext editors:

Restricted Application added a project: VisualEditor. · View Herald TranscriptAug 2 2017, 5:12 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
intgr added a subscriber: intgr.Aug 3 2017, 9:49 AM
DLynch added a subscriber: DLynch.Aug 28 2017, 4:18 PM

Funnily enough, I can't get it to break in the exact way yours is, with the link being split in half. Mine just goes to bad quote encoding instead:

VE sends:

<a href="https://www.google.com/search?q=&#x22;test+Google+search&#x22;" rel="mw:ExtLink">https://www.google.com/search?q=&#x22;test+Google+search&#x22;</a>

Which Parsoid serializes to

https://www.google.com/search?q=&#x22;test+Google+search&#x22;

I would thus assume that for whatever (probably browser-related) reason, yours is sending the quotes not encoded in any way, and Parsoid is still following the exact same href-is-label rule even in a case where the auto-linker won't actually link the whole thing.

Deskana closed this task as Invalid.Oct 27 2017, 10:43 AM
Deskana added a subscriber: Deskana.

This seems to be working fine for me in the visual editor; I pasted the link in, saved, and the link is still functional. This worked in Chrome, Safari, and Firefox. The 2017 wikitext editor is as broken as the 2010 editor.

I see the bad encoding like David which, whilst being suboptimal because the user's input seemingly changes, is only a cosmetic problem since the link otherwise functions exactly as you'd expect.

Test page: https://en.wikipedia.org/wiki/User:Deskana_(WMF)/sandbox/encoding

I'm closing this as invalid since both David and I cannot reproduce.