Opened 10 years ago
Last modified 10 years ago
#13162 confirmed Bug
BBCode plugin crash with smiley
Reported by: | kayue | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.1 |
Keywords: | Cc: |
Description
http://plnkr.co/edit/3cupW1Y2T7zWWTXxtyyF?p=preview
It returns Uncaught TypeError: Cannot read property 'children' of null
Happens when smiley is at the very front of quote.
[quote]:D hello[\quote]
Change History (7)
comment:1 Changed 10 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:2 Changed 10 years ago by
Hi j.swiderski,
http://plnkr.co/edit/UPfGRXL3zIM9x3tetJQ0?p=preview
In script.js If I run:
//It works CKEDITOR.instances.editor1.setData('[color=red]:D hello[/color]'); //It is not working CKEDITOR.instances.editor1.setData('[quote=red]:D hello[/quote]');
I think what you said it is duplicated might not be the case. As color BBCode works if the first word in it is a Smiley but not for Quote I would love to fix it but I hove no clue where to start.
Any ideas?
comment:3 Changed 10 years ago by
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
comment:4 Changed 10 years ago by
Status: | reopened → confirmed |
---|---|
Version: | → 4.1 |
@tom10271 thanks for looking in to this. You are right this is not a duplicate.
Problem can be reproduced from CKEditor 4.1 in all browsers.
Executing below code causes JS error:
CKEDITOR.instances.editor1.setData('[quote=red]:D hello[/quote]');
Error is:
Message: Uncaught TypeError: Cannot read property 'children' of null
URI: /ckeditor-dev/plugins/bbcode/plugin.js
Line: 584
Code: fragment.writeHtml( writer, bbcodeFilter );
comment:5 Changed 10 years ago by
After I tried to fix this problem, I am half way to go. I will create a pull request in GitHub after I finish fixing I tried to let the team to decide the coding and data handling.
comment:6 Changed 10 years ago by
@tom10271 thanks for working on it.
Please note that it is required to provide tests to your PR and describe what or which bug does it fix exactly. Please see e.g. https://github.com/ckeditor/ckeditor-dev/pull/185 or other accepted pull requests.
For some reason your sample didn't work for me but when looking at your configuration I can see this issue is a duplicate of #8198.