Page MenuHomePhabricator

Link dialog puts spaces inside links, causes markup like [[Foo ]]bar which renders as [[Foo bar|Foo]]
Closed, ResolvedPublic

Description

Author: wikibugs

Description:
Wiki_2010-05-18_LinkCreate.pdf

Reporting against Babaco Release : r66321
Tested link :http://prototype.wikimedia.org/en.wikipedia.org/Main_Page

Steps to Reproduce ::

  1. Select a word from the text and highlight
  2. Click on link button from the tool bar
  3. Click on insert
  4. Preview the changes.

<<the link is extended to the word next to the selected. This was not selected for the link initially.>>

Expected Outcome::
Only the text highlighted should contain the link.

Test Environment::
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8

Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1064 Safari/532.5

Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3)

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)


Version: unspecified
Severity: major

Attached:

Details

Reference
bz23578

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:06 PM
bzimport set Reference to bz23578.

Removing reference to "Search and Replace" from summary, I fail to see how S&R is related at all.

This is a very interesting mix between IE including the trailing space in the selection and [[Foo ]]bar being interpreted as [[Foo bar|Foo]] due to the link trail. The best fix is probably to make the link dialog smart so it inserts [[Foo]]<SPACE> when it really wants to insert [[Foo<SPACE>]]