Page MenuHomePhabricator

Parsoid: Linktrails should get a <nowiki /> added on serialisation
Closed, ResolvedPublic

Description

Author: phil

Description:
Link includes the word 'and'

I edited the space after a link so that the word following was right next to the link. I then realised this was not what I wanted so added the space back
The preview indicated all was well with the space included but after saving the word after the link became part of the link

Example:
The text I had was
"A page about a test pilot and his job"
'test pilot' was a link

I edited the page and put the cursor before the 'a' in 'and' and pressed delete.
I then pressed Space to move the word back to its original position
Saved - the preview indicated all was well
After saving - 'and' had become part of the link

Looking at the page in the normal editor it seems the space has not been put back - the Visual Editor display indicates that it has


Version: unspecified
Severity: normal

Attached:

link-following-word.png (161×283 px, 16 KB)

Details

Reference
bz44779

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:42 AM
bzimport added a project: VisualEditor.
bzimport set Reference to bz44779.

This appears to be a problem in Parsoid.

In VisualEditor the user has (effectively) created <a href="foo">bar</a>baz; it is unexpectedly converted into [[foo|bar]]baz instead of [[foo|bar]]<nowiki />baz, hence the confusion.

Gabriel, thoughts?

To me it seems that the VE should produce a DOM including the space:

<a href="foo">bar</a> baz

If that is not the case, then this is a bug in VE. Escaping for legitimate link trails was fixed in bug 33091, which is not yet deployed.

So either way, I don't think there is a bug in Parsoid here.

Ah, couldn't find the bug; thanks, Gabriel.

  • This bug has been marked as a duplicate of bug 33091 ***