Last modified: 2014-04-28 22:28:04 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T39835, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 37835 - VisualEditor: A link can span whitespace but won't be displayed so cannot be edited or noticed
VisualEditor: A link can span whitespace but won't be displayed so cannot be ...
Status: PATCH_TO_REVIEW
Product: VisualEditor
Classification: Unclassified
Editing Tools (Other open bugs)
unspecified
All All
: Low normal
: ---
Assigned To: Roan Kattouw
:
: 51877 54266 (view as bug list)
Depends on: 52037 46464
Blocks: ve-linkediting
  Show dependency treegraph
 
Reported: 2012-06-22 18:07 UTC by James Forrester
Modified: 2014-04-28 22:28 UTC (History)
11 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description James Forrester 2012-06-22 18:07:37 UTC
Take a two-word link (e.g. [[Example link]]). Use the VE inspector to select "Example" and press the remove-formatting button. Repeat with "link". Now the text is "Example <a href='...'> </a> link", which is illegal wikitext, and renders as if there's no link there.
Comment 1 James Forrester 2012-06-22 22:05:31 UTC
Mass-moving items into VisualEditor product
Comment 2 Krinkle 2012-10-01 22:58:55 UTC
(In reply to comment #0)
>  "Example <a href='...'> </a> link", which is illegal wikitext.

... because [[Foo| ]] will trigger the pipe-trick and turn it into [[Foo|Foo]].
Comment 3 Krinkle 2012-10-01 23:02:46 UTC
(In reply to comment #2)
> (In reply to comment #0)
> >  "Example <a href='...'> </a> link", which is illegal wikitext.
> 
> ... because [[Foo| ]] will trigger the pipe-trick and turn it into [[Foo|Foo]].

Actually, it doesn't (current master, not using Tidy).

<pre>
* [[Foo]]
* [[Foo|]]
* [[Foo| ]]
* [[Foo|<nowiki></nowiki>]]
* [[Foo|<nowiki> </nowiki>]]
</pre>

Expands to:

* [[Foo]]
* [[Foo|Foo]]
* [[Foo| ]]
* [[Foo|<nowiki></nowiki>]]
* [[Foo|<nowiki> </nowiki>]]

Renders as:

<ul><li> <a href="/wm-git/mediawiki/alpha/index.php/Foo" title="Foo">Foo</a>
</li><li> <a href="/wm-git/mediawiki/alpha/index.php/Foo" title="Foo">Foo</a>
</li><li> <a href="/wm-git/mediawiki/alpha/index.php/Foo" title="Foo"> </a>
</li><li> <a href="/wm-git/mediawiki/alpha/index.php/Foo" title="Foo"></a>
</li><li> <a href="/wm-git/mediawiki/alpha/index.php/Foo" title="Foo"> </a>
</li></ul>

Which means a loose space works, and with <nowiki> it even works when empty. Good news :)
Comment 4 Roan Kattouw 2013-03-22 21:19:03 UTC
<a> </a> doesn't actually render as a clickable link in Firefox. Even if you set text-decoration:underline; on it, it still doesn't render and can't be clicked. However, <a>&nbsp;</a> does behave "correctly".

We probably shouldn't allow users to create whitespace-only links, because they don't render correctly in HTML let alone wikitext. I'm going to work on a change that strips whitespace-only links in the converter.
Comment 5 Roan Kattouw 2013-03-28 01:20:22 UTC
(In reply to comment #4)
> We probably shouldn't allow users to create whitespace-only links, because
> they
> don't render correctly in HTML let alone wikitext. I'm going to work on a
> change that strips whitespace-only links in the converter.
This part depends on bug 46464.
Comment 6 James Forrester 2013-04-16 19:40:16 UTC
Pulling from this milestone as it's a lot of work for a small feature.
Comment 7 Gerrit Notification Bot 2013-07-16 22:47:32 UTC
Change 74084 had a related patch set uploaded by Catrope:
[WIP] Unwrap whitespace-only links

https://gerrit.wikimedia.org/r/74084
Comment 8 Chris McKenna 2013-07-17 13:04:19 UTC
I don't know if it is related to this bug, but it is no longer possible to select only part of a link. Previously you could unlink the second word separately for example. See also bug 51531 and bug 50945
Comment 9 James Forrester 2013-07-26 22:58:01 UTC
*** Bug 51877 has been marked as a duplicate of this bug. ***
Comment 10 Elitre 2013-08-29 09:59:09 UTC
Just FYI, we have a user at en.wp stating <<I was going to give examples of what turns out to be bug 37835. As the bug is a year old, looks like this won't be fixed and therefore no use in giving the examples.>> :/
Comment 11 James Forrester 2013-09-25 01:20:33 UTC
*** Bug 54266 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links