In Visual Editor 'Add a citation tool' if the title of the URL has a | in it is causes an error message to show up when it is automatically generated.
E,g
John_Cummings | |
Jan 26 2017, 1:58 PM |
F9173617: Screen Shot 2017-08-25 at 14.50.00.png | |
Aug 25 2017, 2:02 PM |
F9173613: Screen Shot 2017-08-25 at 14.49.51.png | |
Aug 25 2017, 2:02 PM |
F5376763: pasted_file | |
Jan 27 2017, 4:52 PM |
In Visual Editor 'Add a citation tool' if the title of the URL has a | in it is causes an error message to show up when it is automatically generated.
E,g
The problem here is the site in question, not Citoid or VisualEditor. The page's title really does have a line feed character in position 79, and the template in question has been written to return this error message if that happens. It wouldn't be correct for VisualEditor to not display this message. I guess Citoid could strip characters like line feeds from a page's title, but that's a dangerous path to start down in case things are stripped that shouldn't be.
It's actually more obvious what's wrong when you're looking at it in VisualEditor than the wikitext editor. If you try to change the title of the reference in VisualEditor then you can quite clearly see the line feed character, which is not visible at all in a wikitext editor (see screenshot 1). If you delete that line feed, everything is fine (see screenshot 2).
The best course of action would be to contact the site and telling them they really shouldn't be putting things like line feeds in their page titles.
Thanks for the explanation @Deskana, it would be interesting to know how widely this is done by websites or if this is a weird problem caused by funny URLs from a couple of sites
It's very rare. This is the first time I've ever seen a web page that has a line feed in its title. Generating hard statistics on this is difficult unless you want to use or write a web crawler to do it.
Indiscriminately stripping things doesn't seem like a good path to go down, and the team has no plans to investigate other solutions at this time.