Opened 13 years ago

Last modified 13 years ago

#6710 confirmed Bug

">" in custom style "name" throws error

Reported by: Gilles van den Hoven Owned by:
Priority: Normal Milestone:
Component: Core : Styles Version: 3.3
Keywords: Cc:

Description

If you include html ">" in the styles definition (name part) the editor throws an error after you click that style in the combobox (most possibly other html to).

For example:
'Webunity > portfolio'

Error: this.element.getDocument().getById(this._.items[m]) is null
Source File: <snip>/ckeditor.js?t=AAM84PO
Line: 135

I found this because my CMS gets the styles from the DB and uses htmlspecialchars(PHP) to print customer specific styles to CkEditor.

Since this will probably be closed without fixing, i just wanted to log it for future users.

Change History (3)

comment:1 Changed 13 years ago by Garry Yao

Status: newpending

Could you provide the full styles definition that is problematic?

comment:2 Changed 13 years ago by Gilles van den Hoven

for instance this one works:

CKEDITOR.stylesSet.add('default', [ { name: 'Webunity > portfolio > werkzaamheden', element: 'div', attributes: { 'class': 'wuPortfolio' } }, { name: 'Webunity > blauw', element: 'span', attributes: { 'class': 'wuBlauw' } }, { name: 'Webunity > grijs (licht)', element: 'span', attributes: { 'class': 'wuGrijsLicht' } }, { name: 'Webunity > grijs (donker)', element: 'span', attributes: { 'class': 'wuGrijsDonker' } }, { name: 'CMS - Accordeon titel element', element: 'div', attributes: { 'class': 'wuaTitle' } }, { name: 'Koptekst 1', element: 'h1' }, { name: 'Koptekst 2', element: 'h2' }, { name: 'Koptekst 3', element: 'h3' }, { name: 'Koptekst 4', element: 'h4' }, { name: 'Koptekst 5', element: 'h5' }, { name: 'Koptekst 6', element: 'h6' } ]);

But this one fails:

CKEDITOR.stylesSet.add('default', [ { name: 'Webunity &gt; portfolio &gt; werkzaamheden', element: 'div', attributes: { 'class': 'wuPortfolio' } }, { name: 'Webunity &gt; blauw', element: 'span', attributes: { 'class': 'wuBlauw' } }, { name: 'Webunity &gt; grijs (licht)', element: 'span', attributes: { 'class': 'wuGrijsLicht' } }, { name: 'Webunity &gt; grijs (donker)', element: 'span', attributes: { 'class': 'wuGrijsDonker' } }, { name: 'CMS - Accordeon titel element', element: 'div', attributes: { 'class': 'wuaTitle' } }, { name: 'Koptekst 1', element: 'h1' }, { name: 'Koptekst 2', element: 'h2' }, { name: 'Koptekst 3', element: 'h3' }, { name: 'Koptekst 4', element: 'h4' }, { name: 'Koptekst 5', element: 'h5' }, { name: 'Koptekst 6', element: 'h6' } ]);

comment:3 Changed 13 years ago by Krzysztof Studnik

Component: GeneralCore : Styles
Status: pendingconfirmed
Version: 3.4.3 (SVN - trunk)3.3
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