Page MenuHomePhabricator

Sometimes an ISBN turns up wrapped in nowiki-tags
Open, Needs TriagePublic

Description

Sometimes "Cite" in VisualEditor create an ISBN wrapped in nowiki-tags.

Given I have open a page for editing in VisualEditor (empty page works)
And open a page with an ISBN id (example)
When I copy the number part from ISBN (under "Product details")
And paste it into the simple form from "Cite" (that is 978-1138943070)
And add "ISBN " before the number (that is ISBN 978-1138943070)
And switch to source code editing
Then the code should be <ref>ISBN 978-1138943070</ref>

It is not, it is <ref><nowiki>ISBN 978-1138943070</nowiki></ref>.

The edit frame in "Cite" seems to be VE, and it accepts html, so I guess some kind of html-wrapper (li?) triggers the behavior, so even if it seems clean during copy-pasting it is not. There are some html-stuff there, and the nowiki-tags are added due to that markup.

I'm not quite sure if this is a bug in VE or citoid, but it is annoying as the editors must clean up the code afterwards.

Event Timeline

jeblad created this task.Mar 29 2019, 12:48 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 29 2019, 12:49 PM
JTannerWMF moved this task from To Triage to Freezer on the VisualEditor board.Apr 9 2019, 3:53 PM
JTannerWMF moved this task from Freezer to Needs Discussion/Analysis on the VisualEditor board.

ISBN links are autodetected on paste, so if you manually construct one by prepending ISBN to the number, it isn't going to get linked. The same would happen if you typed out an external link by hand backwards.

There are always going to be ways around auto-linking, and I'm not sure this use case is necessarily worth fixing.

I argued for this to be put in "Needs Discussion/Analysis" rather than "Freezer", but on a closer look, I agree with Ed – I'm not sure if this case is worth investigating. I think what I really wanted to discuss was T162291 (nowiki around ISBN caused by copy-paste of large blocks, e.g. copying citations from read mode).

Not sure I agree with @Esanders, this is detected, as it has nowiki added to *not* being linked. It should just be left alone.

@jeblad It is detected by Parsoid because it scans the entire document again. Similarly with links it would <nowiki> anything that might get autolinked by wikitext rules but was not linked by VE. Parsoid has no way to determine if the ISBN/link was no linked deliberately by the user so just respects what we send them (i.e. in this case, unlinked text).

Mvolz removed a project: Citoid.Aug 8 2019, 2:17 PM