Opened 13 years ago

Closed 13 years ago

#6588 closed Bug (fixed)

Copy and paste adds <span> if SCAYT is enabled

Reported by: Andy Owned by: Sa'ar Zac Elias
Priority: Normal Milestone: CKEditor 3.4.3
Component: UI : Spell Checker Version: 3.4.2
Keywords: Cc: WebSpellChecker.net

Description

Copying something with a 'spelling' error ( eg CKEditor ) generates extra code when it is pasted in HTML view mode with SCAYT enabled.

The source code <p>CKEditor</p> will lead to <p><span>CKEditor</span></p>.

Error consistently reproducible in Firefox 3.6.12 on Windows and Linux.

Cannot reproduce in IE8 or Chrome.

This is only an issue (for me) when wiki style links are copied and pasted. It messes with things such as [[spelling: eror]], leading to [[spelling: <span>eror</span>]]

Many thanks for your time and for CKEditor, it's awesome!

Attachments (4)

6588.patch (1.3 KB) - added by WebSpellChecker.net 13 years ago.
6588_2.patch (1.2 KB) - added by Garry Yao 13 years ago.
6588_3.patch (1.5 KB) - added by WebSpellChecker.net 13 years ago.
6588_4.patch (1.5 KB) - added by Sa'ar Zac Elias 13 years ago.

Download all attachments as: .zip

Change History (19)

comment:1 Changed 13 years ago by Sa'ar Zac Elias

Cc: WebSpellChecker.net added
Component: GeneralUI : Spell Checker
Keywords: Firefox added
Status: newpending

I'm unable to reproduce your problem. Are you able to reproduce the bug on the samples of the SVN or the nightly build? If not, Please attach or link us to the page you're using.

comment:2 Changed 13 years ago by WebSpellChecker.net

Keywords: Confirmed added

We can confirm this on ckeditor.com/demo

Steps to reproduce:

  1. Open ckeditor.com/demo
  2. Paste any text from Wikipedia with some unknown words
  3. Enable SCAYT and wait until it underlines unknow words
  4. Ctrl+A, then Ctrl+C
  5. Open ckeditor.com/demo once more, e.g. in another tab
  6. Paste copied text
  7. Go to "Source" mode

Actual result:
Misspelled words are wrapped in <span>s.

Expected result:
Source code is the same for both CKEditor tabs.

comment:3 Changed 13 years ago by Sa'ar Zac Elias

Keywords: Confirmed removed
Status: pendingconfirmed

I can confirm that also on IE.

comment:4 Changed 13 years ago by Garry Yao

Keywords: Firefox removed

@SpellCheck.net First of all we have no control over clipboard data, so to help us (and browsers) to properly filtering SCAYT marker when pasting, a valid HTML attribute has to take place, e.g. class="scayt".

comment:5 Changed 13 years ago by WebSpellChecker.net

Yes, we plan to add some filtering to the CKEditor core module to filter <span>s with "scayt_word" or "scaytid" attributes.

Changed 13 years ago by WebSpellChecker.net

Attachment: 6588.patch added

comment:6 Changed 13 years ago by WebSpellChecker.net

Keywords: HasPatch Review? added
Version: 3.4.13.4.2

We have managed to fix this in plug-in. Here is patch. Please, review.

comment:7 Changed 13 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.4.3

The patch looks correct, with some code rewriting.

Changed 13 years ago by Garry Yao

Attachment: 6588_2.patch added

comment:8 Changed 13 years ago by Garry Yao

Keywords: HasPatch Review? removed
Owner: set to Garry Yao
Status: confirmedreview

comment:9 Changed 13 years ago by Garry Yao

Status: reviewreview_failed

Sorry I'm mis-leading here, the right way of fixing this is instead prefixing all SCAYT custom attributes (e.g. scayt_word) with 'data-', check #6334 for more information.

comment:10 Changed 13 years ago by Garry Yao

Owner: Garry Yao deleted
Status: review_failednew

comment:11 Changed 13 years ago by Sa'ar Zac Elias

Status: newconfirmed

comment:12 Changed 13 years ago by WebSpellChecker.net

Keywords: HasPatch Review? added

We have followed your instructions and added the prefix 'data-' to all SCAYT custom attributes. In order to get it work please switch SCAYT plug-in to use SCAYT core 2.6(Ticket: #6769). Please, review.

Changed 13 years ago by WebSpellChecker.net

Attachment: 6588_3.patch added

Changed 13 years ago by Sa'ar Zac Elias

Attachment: 6588_4.patch added

comment:13 Changed 13 years ago by Sa'ar Zac Elias

Keywords: Review? removed
Owner: set to Sa'ar Zac Elias
Status: confirmedreview

Making some code rewriting to your patch.

comment:14 Changed 13 years ago by Garry Yao

Status: reviewreview_failed

There' s no need of doing data filtering, it doesn't affect wysiwyg.

comment:15 Changed 13 years ago by Garry Yao

Keywords: HasPatch removed
Resolution: fixed
Status: review_failedclosed

Fixed with [6169].

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy