Page MenuHomePhabricator

VisualEditor: Typing immediately after link introduces pawn (♙) if link is preceded by multibyte text
Closed, ResolvedPublic

Description

Seems to happen specifically in https://en.wikipedia.org/wiki/Jabhala?veaction=edit for no apparent reason; try it.


Version: unspecified
Severity: normal

Details

Reference
bz51140

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:10 AM
bzimport set Reference to bz51140.

weskaggs wrote:

In case it may be helpful, the character produced is a white chess pawn, unicode 0x2659 (html &#9817). This character is produced if any character is added immediately after any of the three links in the first sentence, but not if a character is added after a link in the second sentence. If the Hindi text in the first sentence is deleted, then characters entered after a link produce the correct result.

Turns out that it happens when inserting any character after the link, but only at the position immediately after the link (so the second character isn't pawned because there's something (the first pawn) between it and the link), and only if there is multibyte text in the same paragraph preceding the link.

The article's first and only paragraph starts with "Jabhala (Hindi:जभाला) is..." and so this bug affects every link on that article. But it doesn't affect any links before जभाला (there aren't any right now but you can create them), and if you use Enter to break the paragraph after the Hindi text, it doesn't affect any links in the second paragraph either.

Assigning to Ed because this is a multibyte issue.

weskaggs wrote:

Further observations: the "pawn" has utf-8 hex code E2 99 99. The multibyte characters that provoke this behavior are either of:

devangiri letter LA, unicode 0x2354, utf-8 hex E0 A4 B2
devangiri letter BHA, unicode 0x2349, utf-8 hex E0 A4 AD

Change 73874 had a related patch set uploaded by Esanders:
Replace text strings with grapheme arrays in onContentChange

https://gerrit.wikimedia.org/r/73874

Change 73874 merged by jenkins-bot:
Replace text strings with grapheme arrays in onContentChange

https://gerrit.wikimedia.org/r/73874

  • Bug 51112 has been marked as a duplicate of this bug. ***