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

Custom bullets with exotic chars crashes in paste from Word #877

Closed
odelaere opened this issue Sep 7, 2017 · 1 comment · Fixed by #902
Closed

Custom bullets with exotic chars crashes in paste from Word #877

odelaere opened this issue Sep 7, 2017 · 1 comment · Fixed by #902
Assignees
Labels
plugin:pastefromword The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. target:major Any docs related issue that should be merged into a major branch. type:bug A bug.
Milestone

Comments

@odelaere
Copy link

odelaere commented Sep 7, 2017

Are you reporting a feature request or a bug?

Bug

Provide detailed reproduction steps (if any)

  1. Open a new Word document
  2. define a custom bullet style (in my case the asterisk from the Symbol font)
  3. use the bullet in your document
  4. try to copy paste it from Word to CKEditor

Expected result

The expected result is the custom bullet to be converted into the standard one. As far as CKEditor have no way to know what the heck this char is.

Actual result

Nothing happens in the UI.

This is logged in the browser console:

14:46:42,239 SyntaxError: nothing to repeat 1 default.js:29:104
	match self-hosted:4348:16
	CKEDITOR.plugins.pastefromword.lists.removeSymbolText/< https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/plugins/pastefromword/filter/default.js:29:105
	CKEDITOR.htmlParser.fragment.prototype.forEach https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:282:18
	CKEDITOR.htmlParser.fragment.prototype.forEach https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:281:496
	CKEDITOR.htmlParser.fragment.prototype.forEach https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:281:496
	CKEDITOR.plugins.pastefromword.lists.removeSymbolText https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/plugins/pastefromword/filter/default.js:29:79
	CKEDITOR.plugins.pastefromword.lists.convertToFakeListItem https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/plugins/pastefromword/filter/default.js:28:194
	CKEDITOR.cleanWord/q<.elements.p https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/plugins/pastefromword/filter/default.js:8:485
	a.prototype.exec https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:287:163
	CKEDITOR.htmlParser.filter<.proto.onElement https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:285:1
	CKEDITOR.htmlParser.element.prototype<.filter https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:311:63
	CKEDITOR.htmlParser.fragment.prototype.filterChildren https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:281:41
	CKEDITOR.cleanWord/q<.root https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/plugins/pastefromword/filter/default.js:6:292
	a.prototype.exec https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:287:163
	CKEDITOR.htmlParser.filter<.proto.onRoot https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:284:345
	CKEDITOR.htmlParser.fragment.prototype.filter https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:280:301
	CKEDITOR.htmlParser.filter<.proto.applyTo https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:284:27
	CKEDITOR.cleanWord https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/plugins/pastefromword/filter/default.js:17:272
	.init/</m< https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:1107:206
	a https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:1105:110
	.init/< https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:1107:60
	c https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:11:176
	CKEDITOR.event.prototype</<.fire</< https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:13:27
	CKEDITOR.editor.prototype.fire https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:14:195
	.init/</m< https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:1107:82
	CKEDITOR.scriptLoader</<.load/h https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:233:364
	CKEDITOR.scriptLoader</<.load/n https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:234:1
	CKEDITOR.scriptLoader</<.load/q https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:234:81
	CKEDITOR.scriptLoader</<.load/p/e.$.onload/< https://ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.2/ckeditor.js:234:509

Other details

  • Browser: Firefox 53.3.0 32 bits
  • OS: Windows 7
  • CKEditor version: 4.7.2 (17 Aug 2017)
  • Installed CKEditor plugins: CKEditor 4.7.2 (Full) / CKEditor 4.7.3 (Full) (revision 141fd23)
@msamsel msamsel self-assigned this Sep 11, 2017
@msamsel
Copy link
Contributor

msamsel commented Sep 11, 2017

I can confirm problem. It seems that Paste From Word Filter wrongly interpret such character. It appears also for other characters used by regular expressions (e.g. ?, +, etc.). Example of clipboard data which cause the situation:
https://gist.github.com/msamsel/dafc4cdecc6d73c3d63fb2281464a081

@msamsel msamsel removed their assignment Sep 11, 2017
@msamsel msamsel added plugin:pastefromword The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:bug A bug. labels Sep 11, 2017
@msamsel msamsel added this to the Backlog milestone Sep 11, 2017
@mlewand mlewand added the target:minor Any docs related issue that can be merged into a master or major branch. label Sep 11, 2017
@msamsel msamsel self-assigned this Sep 11, 2017
@mlewand mlewand modified the milestones: Backlog, 4.8.0 Oct 6, 2017
@mlewand mlewand added target:major Any docs related issue that should be merged into a major branch. and removed target:minor Any docs related issue that can be merged into a master or major branch. labels Oct 6, 2017
f1ames added a commit that referenced this issue Oct 6, 2017
Fix for error in PFW when bullets use special characters [#877]
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. target:major Any docs related issue that should be merged into a major branch. type:bug A bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants