Temporary Disabled. :) please Go back ⚓ T71494 Insufficient span tags stripping from copy-and-paste in Safari www.fgks.org » Address: [go: up one dir, main page] Include Form Remove Scripts Accept Cookies Show Images Show Referer Rotate13 Base64 Strip Meta Strip Title Session Cookies Page MenuHomePhabricatorSearchConfigure Global SearchLog InCreate Task Maniphest T71494 Insufficient span tags stripping from copy-and-paste in SafariClosed, ResolvedPublic8 Estimated Story PointsActionsEdit TaskEdit Related Tasks...Create SubtaskEdit Parent TasksEdit SubtasksMerge Duplicates InClose As DuplicateEdit Related Objects...Edit CommitsEdit MocksSubscribeMute NotificationsProtect as security issueAward TokenFlag For LaterAssigned To• EsandersAuthored By• MZMcBrideAug 13 2014, 9:22 PM2014-08-13 21:22:00 (UTC+0)TagsVisualEditor (FY 18-19 Q3/Q4)VisualEditor 2014/15 Q3 blockers (Done)VisualEditor-CopyPaste (Backlog)Browser-Support-Apple-Safari (Backlog)WMF-deploy-2015-04-01_(1.25wmf24) (Backlog)Notice (Archive)User-notice-archive (Backlog)User-Ryasmeen (To be Verified)Referenced FilesNoneSubscribersAklapperCatropecscottDrongouEdgars2007• ElitreEloquenceView All 20 SubscribersDescriptionFrom @TrevorParscal's report on T78540#1157939: Reproduced with Safari 8.0.4 on MacOS X 10.10.2. Select an internal link, a space and some plain text Copy Paste Click save Click preview changes Notice that there's an extra span around the space and plain text in the pasted content DetailsReference bz69494 SubjectRepoBranchLines +/-Simplify getClipboardHashVisualEditor/VisualEditormaster+17 -22Customize query in gerritRelated ObjectsMentionsDuplicatesMentioned In T96589: More <span> corruption (unknown source)T96101: <span lang="XX-YY"> added on ZZ Wikipedia T95708: <span lang="XX-YY"> added on XX WikipediaT94767: Perform a weekly review of edits made with VisualEditorrGVEDa7590a0f32d2: Simplify getClipboardHashT78540: Insufficient span tags stripping from copy-and-paste in Safari Mentioned Here T96589: More <span> corruption (unknown source)T95708: <span lang="XX-YY"> added on XX WikipediaT78540: Insufficient span tags stripping from copy-and-paste in Safari Duplicates Merged Here T78540: Insufficient span tags stripping from copy-and-paste in SafariT93125: <span>s inserted in VE edit Event Timeline• bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:45 AM2014-11-22 03:45:15 (UTC+0)• bzimport added a project: VisualEditor.• bzimport set Reference to bz69494.• MZMcBride created this task.Aug 13 2014, 9:22 PM2014-08-13 21:22:00 (UTC+0)• MZMcBride added a comment.Aug 13 2014, 9:23 PM2014-08-13 21:23:13 (UTC+0)Comment Actionshttps://en.wikipedia.org/w/index.php?title=Robin_Williams&curid=53242&diff=621104900&oldid=621103379Catrope added a comment.Aug 13 2014, 10:22 PM2014-08-13 22:22:22 (UTC+0)Comment ActionsWow that's weird. I wonder if this is related to copy/paste in any way?Jdforrester-WMF changed the task status from Open to Stalled.Feb 2 2015, 7:24 PM2015-02-02 19:24:20 (UTC+0)• Whatamidoing-WMF added a project: VisualEditor 2014/15 Q3 blockers.Mar 18 2015, 6:39 AM2015-03-18 06:39:19 (UTC+0)• Whatamidoing-WMF subscribed.Comment ActionsThis has suddenly started happening all over the place. It's also adding language codes. It might be related to copying. I've definitely seen this in Safari 6.2 on Mac OS 10.8.5 https://en.wikipedia.org/w/index.php?title=Chandler_Bats&diff=prev&oldid=651740262 is a fairly clean example.• Whatamidoing-WMF added a comment.Mar 18 2015, 6:46 AM2015-03-18 06:46:59 (UTC+0)Comment Actionshttps://fr.wikipedia.org/w/index.php?title=Zach_Galifianakis&diff=next&oldid=112817147 adds left-to-right code. https://fr.wikipedia.org/w/index.php?title=Zach_Galifianakis&diff=prev&oldid=112800605 (earlier) adds many span tags. Based on the content, it might be adding them to copy-paste content. This bit in particular: <span lang="FR"><span lang="FR">[1]</span> http://www.zachgalifianakis.com/biographytext.htm</span> looks rather like the editor copied a citation from the en.wp article and pasted it into the fr.wp article (and then translated the text).• Elitre subscribed.Mar 18 2015, 1:04 PM2015-03-18 13:04:12 (UTC+0)Jdforrester-WMF moved this task from Nominated to Accepted on the VisualEditor 2014/15 Q3 blockers board.Mar 18 2015, 11:14 PM2015-03-18 23:14:54 (UTC+0)Jdforrester-WMF renamed this task from VisualEditor: Unnecessary <span>s inserted into articles to Unnecessary <span>s inserted into articles.Mar 19 2015, 2:28 AM2015-03-19 02:28:04 (UTC+0)Jdforrester-WMF changed the task status from Stalled to Open.Jdforrester-WMF triaged this task as High priority.Jdforrester-WMF merged a task: T93125: <span>s inserted in VE edit.Jdforrester-WMF set Security to None.Jdforrester-WMF edited a custom field.Jdforrester-WMF added subscribers: Eloquence, • gpaumier, Aklapper.Mooeypoo subscribed.Mar 20 2015, 12:28 AM2015-03-20 00:28:22 (UTC+0)Comment ActionsWhen a text is copied between different-language wikipedias, it seems to me to be perfectly fine that it is wrapped with a <span> that states the original language. If the user copy/pastes and then erases the text, they should, theoretically (And practically -- it's marked) erase the language annotation. I can't manage to reproduce the overlapping span tags (the double spans) that used to appear back in August. The current ones are more or less what we want to see, or copy/paste in pieces by the user. The potential bugs I see here are: If the user did not see an indication that these copy/paste language spans are language annotations, that's a bug This line seems to be a bug, since it's a double-wrapper language span that shouldn't happen even if it was a result of a copy/pate from another language. <span lang="FR"><span lang="FR">[1]</span> http://www.zachgalifianakis.com/biographytext.htm</span>Mooeypoo added a comment.Mar 20 2015, 12:29 AM2015-03-20 00:29:51 (UTC+0)Comment ActionsBy the way, it also makes perfect sense to add directionality to a language block, especially if that language block is being edited. That's the point of language annotations, and it seems to be very convenient that this automatically happens between copy/pastes. It helps not only the editor, but also the page in read mode, as well as indexing, accessiblity, etc. That part I wouldn't call a bug unless there's something I'm completely missing here.NicoV subscribed.Mar 20 2015, 8:15 AM2015-03-20 08:15:59 (UTC+0)Comment Actions@Mooeypoo What you seem to miss in your two comments is that the language code put in the lang tags doesn't seem to be the original language, but the language of the current wiki... All the examples above show lang="EN" added to enwiki, lang="FR" added to frwiki: this is totally useless; and if it's due to a copy from a wiki in an other language, it's just plain wrong Same for the directionality: default directionality on frwiki is "ltr", so adding a dir="ltr" is useless.Mooeypoo added a comment.Mar 23 2015, 7:55 PM2015-03-23 19:55:05 (UTC+0)Comment Actions@NicoV, you're right. Apologies, I missed that. The <span> languages shouldn't be added from the same language.cscott added subscribers: • ssastry, cscott.Mar 23 2015, 8:39 PM2015-03-23 20:39:35 (UTC+0)Comment ActionsHere's another example, with no language tags: https://en.wikipedia.org/w/index.php?title=Moto_360&curid=42238402&diff=653207044&oldid=653203355 @ssastry thinks this is related to cut-and-paste, and that there used to be bogus ID attributes in the <span>s which were removed by Parsoid (see https://gerrit.wikimedia.org/r/197656 ).• ssastry added a comment.Mar 23 2015, 8:43 PM2015-03-23 20:43:51 (UTC+0)Comment ActionsIn case it is useful to VE to debug, open https://logstash.wikimedia.org/#/dashboard/elasticsearch/parsoid and search for "html2wt" -- you will find logged warnings (1 warning per span found => multiple warnings per page in some cases).Negative24 subscribed.Mar 23 2015, 9:01 PM2015-03-23 21:01:19 (UTC+0)Jdforrester-WMF assigned this task to Catrope.Mar 24 2015, 10:13 PM2015-03-24 22:13:25 (UTC+0)• gpaumier added a comment.Mar 24 2015, 10:20 PM2015-03-24 22:20:10 (UTC+0)Comment ActionsDoes this ticket cover all insertions of span tags? Is is useful to provide more diffs? (for example https://fr.wikipedia.org/w/index.php?diff=113225218 )Jdforrester-WMF moved this task from To Triage to External and Administrivia on the VisualEditor board.Mar 25 2015, 10:01 PM2015-03-25 22:01:35 (UTC+0)Jdforrester-WMF renamed this task from Unnecessary <span>s inserted into articles to Insufficient span tags stripping from copy-and-paste in Safari.Mar 27 2015, 10:50 PM2015-03-27 22:50:03 (UTC+0)Jdforrester-WMF reassigned this task from Catrope to • Esanders.Jdforrester-WMF merged a task: T78540: Insufficient span tags stripping from copy-and-paste in Safari.Jdforrester-WMF added projects: VisualEditor-CopyPaste, Browser-Support-Apple-Safari.Jdforrester-WMF edited a custom field.Jdforrester-WMF mentioned this in T78540: Insufficient span tags stripping from copy-and-paste in Safari.Jdforrester-WMF added subscribers: • TrevorParscal, Drongou, • Esanders.Jdforrester-WMF updated the task description. (Show Details)Mar 27 2015, 10:53 PM2015-03-27 22:53:00 (UTC+0)• TrevorParscal edited a custom field.Mar 27 2015, 11:28 PM2015-03-27 23:28:07 (UTC+0)gerritbot subscribed.Mar 28 2015, 11:59 AM2015-03-28 11:59:10 (UTC+0)Comment ActionsChange 200299 had a related patch set uploaded (by Esanders): Simplify getClipboardHash https://gerrit.wikimedia.org/r/200299gerritbot added a project: Patch-For-Review.Mar 28 2015, 11:59 AM2015-03-28 11:59:11 (UTC+0)• Esanders added a comment.Mar 28 2015, 6:42 PM2015-03-28 18:42:28 (UTC+0)Comment Actions@gpaumier no, but https://gerrit.wikimedia.org/r/#/c/200304/ address thatJdforrester-WMF closed this task as Resolved.Mar 29 2015, 10:34 PM2015-03-29 22:34:56 (UTC+0)Jdforrester-WMF edited projects, added WMF-deploy-2015-04-01_(1.25wmf24); removed Patch-For-Review.gerritbot added a comment.Mar 29 2015, 10:39 PM2015-03-29 22:39:17 (UTC+0)Comment ActionsChange 200299 merged by jenkins-bot: Simplify getClipboardHash https://gerrit.wikimedia.org/r/200299Jdforrester-WMF mentioned this in rGVEDa7590a0f32d2: Simplify getClipboardHash.Mar 29 2015, 10:39 PM2015-03-29 22:39:24 (UTC+0)Jdforrester-WMF moved this task from Accepted to Done on the VisualEditor 2014/15 Q3 blockers board.Mar 29 2015, 10:40 PM2015-03-29 22:40:19 (UTC+0)Jdforrester-WMF moved this task from External and Administrivia to FY 18-19 Q3/Q4 on the VisualEditor board.Mar 29 2015, 10:47 PM2015-03-29 22:47:59 (UTC+0)• Elitre reopened this task as Open.Apr 3 2015, 7:32 AM2015-04-03 07:32:01 (UTC+0)Comment ActionsStill seeing those span tags in the wild...• Elitre closed this task as Resolved.Apr 3 2015, 7:33 AM2015-04-03 07:33:20 (UTC+0)Comment ActionsMaybe I should look at the Version before commenting though?• gpaumier mentioned this in T94767: Perform a weekly review of edits made with VisualEditor.Apr 3 2015, 5:50 PM2015-04-03 17:50:05 (UTC+0)• gpaumier added projects: Notice, User-notice.Apr 3 2015, 9:07 PM2015-04-03 21:07:46 (UTC+0)• gpaumier moved this task from To Triage to Announce in next Tech/News on the User-notice board.• gpaumier moved this task from Backlog to Triaged on the Notice board.• gpaumier moved this task from Announce in next Tech/News to In current Tech/News draft on the User-notice board.Apr 3 2015, 9:31 PM2015-04-03 21:31:40 (UTC+0)• gpaumier moved this task from In current Tech/News draft to Recently announced in Tech/News on the User-notice board.Apr 3 2015, 10:08 PM2015-04-03 22:08:21 (UTC+0)matej_suchanek moved this task from Triaged to Archive on the Notice board.Apr 7 2015, 3:07 PM2015-04-07 15:07:09 (UTC+0)• gpaumier moved this task from Recently announced in Tech/News to Already announced/Archive on the User-notice board.Apr 9 2015, 5:51 PM2015-04-09 17:51:52 (UTC+0)• gpaumier mentioned this in T95708: <span lang="XX-YY"> added on XX Wikipedia.Apr 10 2015, 3:50 PM2015-04-10 15:50:14 (UTC+0)Comment ActionsSee also: T95708NicoV added a comment.Apr 14 2015, 10:09 PM2015-04-14 22:09:50 (UTC+0)Comment ActionsDoesn't seem to be entirely fixed, we still get <span lang="EN-US"> on fr wikipedia, for text that is obviously not in English. https://fr.wikipedia.org/w/index.php?title=La_route_M%C3%A9diterran%C3%A9e&curid=9025986&diff=113836353&oldid=113835437• Whatamidoing-WMF mentioned this in T96101: <span lang="XX-YY"> added on ZZ Wikipedia .Apr 14 2015, 11:08 PM2015-04-14 23:08:16 (UTC+0)NicoV added a comment.Apr 15 2015, 6:33 AM2015-04-15 06:33:46 (UTC+0)Comment ActionsOther example of problems still occurring, this time with span tags without attributes, around whitespace: https://fr.wikipedia.org/w/index.php?title=Lyc%C3%A9e_Paul_Eluard&diff=prev&oldid=113829511 https://fr.wikipedia.org/w/index.php?title=Lyc%C3%A9e_Paul_Eluard&diff=prev&oldid=113829346 https://fr.wikipedia.org/w/index.php?title=Lyc%C3%A9e_Paul_Eluard&diff=prev&oldid=113828982 ...• Elitre reopened this task as Open.Apr 16 2015, 1:06 PM2015-04-16 13:06:47 (UTC+0)Comment ActionsReopening because this doesn't look fixed. On cywiki there are lang=CY span tags yet. The user shouldn't have copy/pasted wikitext, but the span tags indicating the context is in the same language than the wiki it's being pasted on do not seem useful.• gpaumier added a project: VisualEditor 2014/15 Q4 blockers.Apr 16 2015, 5:23 PM2015-04-16 17:23:31 (UTC+0)NicoV added a comment.Edited · Apr 18 2015, 10:34 AM2015-04-18 10:34:36 (UTC+0)Comment ActionsOn frwiki, still also https://fr.wikipedia.org/w/index.php?title=Chip-Seq&oldid=113950851 https://fr.wikipedia.org/w/index.php?title=Liberlande&diff=prev&oldid=113947611Liuxinyu970226 subscribed.Apr 19 2015, 6:06 AM2015-04-19 06:06:05 (UTC+0)NicoV added a comment.Apr 19 2015, 7:58 AM2015-04-19 07:58:55 (UTC+0)Comment ActionsAnd not only it's almost always useless, but it can also be totally wrong... In this edit, span tags were added with lang="FR" when it's clearly not in French.NicoV added a comment.Apr 20 2015, 9:40 AM2015-04-20 09:40:03 (UTC+0)Comment ActionsPlease, do something about this, this is really annoying to see trash like this written on a production wiki : https://fr.wikipedia.org/w/index.php?title=Centre_collaborateur_OMS_pour_la_recherche_et_la_formation_en_sant%C3%A9_mentale_%28CCOMS_Lille%29&oldid=114181936NicoV raised the priority of this task from High to Unbreak Now!.Apr 20 2015, 9:40 AM2015-04-20 09:40:19 (UTC+0)Aklapper lowered the priority of this task from Unbreak Now! to High.Apr 20 2015, 10:55 AM2015-04-20 10:55:46 (UTC+0)Comment ActionsRestoring previous priority "high" - Maintainers will take a look at this soon and are aware of this problem, but it is up to them to judge priority in comparison with other open urgent tasks (plus this got reopened on Thursday and there's been a weekend since then). Sorry for the inconvenience caused by this. :-/NicoV added a comment.Apr 20 2015, 11:06 AM2015-04-20 11:06:20 (UTC+0)Comment ActionsExamples of this not working have been posted both here and at enwiki since the 14th and no answer or no acknowledgement in either place since then (tuesday last week, reopening it on friday was already a consequence of no one answering). I raised the priority so that someone will do something instead of ignoring the problem.Jdforrester-WMF closed this task as Resolved.Apr 20 2015, 6:22 PM2015-04-20 18:22:41 (UTC+0)Jdforrester-WMF mentioned this in T96589: More <span> corruption (unknown source).Comment ActionsMoved new bug reports to T96589: More <span> corruption (unknown source). The bug here was fixed, this appears to be a different source.Jdforrester-WMF removed a project: VisualEditor 2014/15 Q4 blockers.Apr 20 2015, 6:23 PM2015-04-20 18:23:25 (UTC+0)Liuxinyu970226 unsubscribed.Apr 21 2015, 4:34 AM2015-04-21 04:34:58 (UTC+0)Edgars2007 subscribed.May 1 2016, 4:52 PM2016-05-01 16:52:37 (UTC+0)Ladsgroup edited projects, added User-notice-archive; removed User-notice.Aug 13 2022, 1:54 PM2022-08-13 13:54:00 (UTC+0) · Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptAug 13 2022, 1:54 PM2022-08-13 13:54:01 (UTC+0) · Log In to Comment
From @TrevorParscal's report on T78540#1157939:
Reproduced with Safari 8.0.4 on MacOS X 10.10.2.
https://en.wikipedia.org/w/index.php?title=Robin_Williams&curid=53242&diff=621104900&oldid=621103379
Wow that's weird. I wonder if this is related to copy/paste in any way?
This has suddenly started happening all over the place. It's also adding language codes. It might be related to copying. I've definitely seen this in Safari 6.2 on Mac OS 10.8.5
https://en.wikipedia.org/w/index.php?title=Chandler_Bats&diff=prev&oldid=651740262 is a fairly clean example.
https://fr.wikipedia.org/w/index.php?title=Zach_Galifianakis&diff=next&oldid=112817147 adds left-to-right code.
https://fr.wikipedia.org/w/index.php?title=Zach_Galifianakis&diff=prev&oldid=112800605 (earlier) adds many span tags. Based on the content, it might be adding them to copy-paste content. This bit in particular:
<span lang="FR"><span lang="FR">[1]</span> http://www.zachgalifianakis.com/biographytext.htm</span>
looks rather like the editor copied a citation from the en.wp article and pasted it into the fr.wp article (and then translated the text).
When a text is copied between different-language wikipedias, it seems to me to be perfectly fine that it is wrapped with a <span> that states the original language. If the user copy/pastes and then erases the text, they should, theoretically (And practically -- it's marked) erase the language annotation.
I can't manage to reproduce the overlapping span tags (the double spans) that used to appear back in August. The current ones are more or less what we want to see, or copy/paste in pieces by the user.
The potential bugs I see here are:
By the way, it also makes perfect sense to add directionality to a language block, especially if that language block is being edited. That's the point of language annotations, and it seems to be very convenient that this automatically happens between copy/pastes. It helps not only the editor, but also the page in read mode, as well as indexing, accessiblity, etc. That part I wouldn't call a bug unless there's something I'm completely missing here.
@Mooeypoo What you seem to miss in your two comments is that the language code put in the lang tags doesn't seem to be the original language, but the language of the current wiki... All the examples above show lang="EN" added to enwiki, lang="FR" added to frwiki: this is totally useless; and if it's due to a copy from a wiki in an other language, it's just plain wrong
Same for the directionality: default directionality on frwiki is "ltr", so adding a dir="ltr" is useless.
@NicoV, you're right. Apologies, I missed that. The <span> languages shouldn't be added from the same language.
Here's another example, with no language tags: https://en.wikipedia.org/w/index.php?title=Moto_360&curid=42238402&diff=653207044&oldid=653203355
@ssastry thinks this is related to cut-and-paste, and that there used to be bogus ID attributes in the <span>s which were removed by Parsoid (see https://gerrit.wikimedia.org/r/197656 ).
In case it is useful to VE to debug, open https://logstash.wikimedia.org/#/dashboard/elasticsearch/parsoid and search for "html2wt" -- you will find logged warnings (1 warning per span found => multiple warnings per page in some cases).
Does this ticket cover all insertions of span tags? Is is useful to provide more diffs? (for example https://fr.wikipedia.org/w/index.php?diff=113225218 )
Change 200299 had a related patch set uploaded (by Esanders): Simplify getClipboardHash
https://gerrit.wikimedia.org/r/200299
@gpaumier no, but https://gerrit.wikimedia.org/r/#/c/200304/ address that
Change 200299 merged by jenkins-bot: Simplify getClipboardHash
Still seeing those span tags in the wild...
Maybe I should look at the Version before commenting though?
See also: T95708
Doesn't seem to be entirely fixed, we still get <span lang="EN-US"> on fr wikipedia, for text that is obviously not in English.
https://fr.wikipedia.org/w/index.php?title=La_route_M%C3%A9diterran%C3%A9e&curid=9025986&diff=113836353&oldid=113835437
Other example of problems still occurring, this time with span tags without attributes, around whitespace:
https://fr.wikipedia.org/w/index.php?title=Lyc%C3%A9e_Paul_Eluard&diff=prev&oldid=113829511 https://fr.wikipedia.org/w/index.php?title=Lyc%C3%A9e_Paul_Eluard&diff=prev&oldid=113829346 https://fr.wikipedia.org/w/index.php?title=Lyc%C3%A9e_Paul_Eluard&diff=prev&oldid=113828982 ...
Reopening because this doesn't look fixed. On cywiki there are lang=CY span tags yet. The user shouldn't have copy/pasted wikitext, but the span tags indicating the context is in the same language than the wiki it's being pasted on do not seem useful.
On frwiki, still also
https://fr.wikipedia.org/w/index.php?title=Chip-Seq&oldid=113950851 https://fr.wikipedia.org/w/index.php?title=Liberlande&diff=prev&oldid=113947611
And not only it's almost always useless, but it can also be totally wrong... In this edit, span tags were added with lang="FR" when it's clearly not in French.
Please, do something about this, this is really annoying to see trash like this written on a production wiki :
https://fr.wikipedia.org/w/index.php?title=Centre_collaborateur_OMS_pour_la_recherche_et_la_formation_en_sant%C3%A9_mentale_%28CCOMS_Lille%29&oldid=114181936
Restoring previous priority "high" - Maintainers will take a look at this soon and are aware of this problem, but it is up to them to judge priority in comparison with other open urgent tasks (plus this got reopened on Thursday and there's been a weekend since then). Sorry for the inconvenience caused by this. :-/
Examples of this not working have been posted both here and at enwiki since the 14th and no answer or no acknowledgement in either place since then (tuesday last week, reopening it on friday was already a consequence of no one answering). I raised the priority so that someone will do something instead of ignoring the problem.
Moved new bug reports to T96589: More <span> corruption (unknown source). The bug here was fixed, this appears to be a different source.