Page MenuHomePhabricator

VE must convert MS-Word footnotes to <ref> tags and not to [[:File:]] links
Open, LowPublic

Description

In these Hebrew Wikipedia edits, multiple files (קובץ namespace is "File") were added, and the URL is actually a local Windows-style path: C:/Users, etc.:

  • one (I suspect that this one was copy-pasted from an MS-Word document)
  • two

This shouldn't be possible.

A similar bug was resolved in the past: T138956: VE seems to be able to "add" links to files that are (probably) stored on the editor's local hard drive. For a long while I haven't seen anything like this, and today it happened twice.

Event Timeline

I can't see how VE could possibly have access to a user's file system, which likely means users are pasting in text which is a local file path. Since it's entirely possible that the user really intended to do that, for example in the Path (computing) article, VE cannot magically detect the user's intent. I'm not sure there's much for us to do here.

Yes, but these are pasted as a link, so I'd expect the link inspector to detect it. Such links are never useful as real links on a website. I can imagine them being useful on an internal wiki within an intranet, but not on a site like Wikipedia.

What do you mean "pasted as a link"? If I paste a file path into a page using VisualEditor, it doesn't use the link inspector. Do you mean the user is opening the link inspector and pasting a URL in there, rather than just pasting a big block of text that happens to contain a file path?

Apologies for the confusion. I'm new to VE. :-)

I don't know exactly what did these users do, but if you look at the diffs linked from the task description and the comments, you'll see that the problematic strings appear in double square brackets.

I only have examples in Hebrew, but here's one:

במלחמה זו.[[:קובץ:///C:/Users/Daniel/Dropbox/לימודים/תיקיית עבודה/היסטוריה/עבודות/ערך ויקיפדיה אמפיפוליס מעודכן.docx# ftn1|[1]]]

Translated to English, it's something like:

[[:File:///C:/Users/Daniel/Dropbox/Studies/Amphipolis.docx# ftn1|[1]]].

It's quite possible that this was copied from a Word document, and it was a link to a footnote, so maybe this is an issue with conversion from Word, and not with the link inspector.

I'll took a closer look at the other examples, too.

... Yep, I now examined the other two examples closely, and it looks like they have the same problem: The user probably wrote the whole article, including footnotes, in an MS-Word document, and copy-pasted all of it.

I don't have MS-Word to test, so somebody with Windows+Office should test it, but I'm 99% certain that that's what happened. I'll even be bold and rename the task.

MS-Word footnotes should have been converted to <ref> tags and not to such links. AFAIK, VE is already quite capable of converting pasted MS-Word content to correct wiki syntax, so this doesn't sound impossible.

Amire80 renamed this task from VE seems to be able to "add" links to files that are (probably) stored on the editors' local hard drives to VE must convert MS-Word footnotes to <ref> tags and not to [[:File:]] links.May 31 2017, 2:46 PM
Deskana moved this task from To Triage to Freezer on the VisualEditor board.