Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image from Word is incorrectly pasted when its alternative text is an URL #2516

Open
f1ames opened this issue Oct 25, 2018 · 2 comments
Open
Labels
plugin:pastefromword The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:bug A bug.

Comments

@f1ames
Copy link
Contributor

f1ames commented Oct 25, 2018

Type of report

Bug

Provide detailed reproduction steps (if any)

  1. Go to any CKEditor instance with PFW plugin enabled (e.g. SDK PFW sample).
  2. Open provided Word file (CKSource.Logo.docx) and copy its contents.
  3. Paste into the editor.

Expected result

The same image as in the Word document is pasted into the editor.

Actual result

The image with src attribute pointing to URL which was present in alt attribute is used:

<img alt="https://cksource.com" height="251" src="https://cksource.com" width="251" />

From one side it is a very specific edge case, I have discovered it when looking into the plugins code. It wasn't reported earlier which means nobody encountered it "in a wild" yet (or just didn't report it).

On the other hand I can imagine a situation when somebody may want to use and URL as an image alt text like in the example document above (and screenshot below).

screen shot 2018-10-24 at 17 26 47

Other details

  • Browser: Tested on Chrome
  • OS: macOS 10.13.6
  • CKEditor version: Latest - 4.10.1
  • Installed CKEditor plugins: Paste from Word
@f1ames f1ames added type:bug A bug. plugin:pastefromword The plugin which probably causes the issue. labels Oct 25, 2018
@mlewand mlewand self-assigned this Oct 25, 2018
@mlewand mlewand added status:confirmed An issue confirmed by the development team. target:minor Any docs related issue that can be merged into a master or major branch. labels Oct 25, 2018
@mlewand mlewand removed their assignment Oct 25, 2018
@f1ames f1ames removed the target:minor Any docs related issue that can be merged into a master or major branch. label Nov 12, 2019
@Comandeer
Copy link
Member

These images are available in RTF, so they can be easily embedded instead of linked to external source. The whole fix is just to remove the special handling of [alt] with URLs.

@jacekbogdanski
Copy link
Member

I'm for embedding, it makes more sense as the image resource won't affect how pasting works e.g. if the resource is no longer available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin:pastefromword The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:bug A bug.
Projects
None yet
Development

No branches or pull requests

4 participants