Opened 9 years ago

Last modified 9 years ago

#14648 confirmed Bug

config.allowedContent doesn't work when BBCode plugin active — at Version 2

Reported by: Alan Howshall Owned by:
Priority: Normal Milestone:
Component: General Version: 4.5.9
Keywords: Cc:

Description (last modified by Marek Lewandowski)

Steps to reproduce

  1. Download the following CKBuilder package http://ckeditor.com/builder/6e18dbe9776749ca0c98f94ccc0e842f which is my desired minimal editor inc BBCode plugin.
  2. Add config.allowedContent = 'strong em ul li;'; into default downloaded config.js
  3. Paste Strikethrough or other hidden button formatted content, like Superscript, from MS Word or similar.

Expected result

With added config.allowedContent = 'strong em ul li;'; formating like Strikethrough, Superscript etc should be auto removed on paste as they do not match 4x specified allowedContent tags.

Actual result

Not allowedContent included tags are allowed through on paste and shown visually in CKEditor window.

However if you add additional config.removePlugins = 'bbcode'; to temporarily disable BBCode then config.allowedContent is working properly as expected with no other changes.

So it appears to be the addition of (needed) BBCode plugin that is stopping config.allowedContent working correctly.

Other details (browser, OS, CKEditor version, installed plugins)

Issue replicated on CKEditor 4.5.9 on Windows 8.1 in Firefox 46 and Chrome 50

Paste of CKBuilder http://ckeditor.com/builder/6e18dbe9776749ca0c98f94ccc0e842f is:

/**
 * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see LICENSE.md or http://ckeditor.com/license
 */

/**
 * This file was added automatically by CKEditor builder.
 * You may re-use it at any time to build CKEditor again.
 *
 * If you would like to build CKEditor online again
 * (for example to upgrade), visit one the following links:
 *
 * (1) http://ckeditor.com/builder
 *     Visit online builder to build CKEditor from scratch.
 *
 * (2) http://ckeditor.com/builder/6e18dbe9776749ca0c98f94ccc0e842f
 *     Visit online builder to build CKEditor, starting with the same setup as before.
 *
 * (3) http://ckeditor.com/builder/download/6e18dbe9776749ca0c98f94ccc0e842f
 *     Straight download link to the latest version of CKEditor (Optimized) with the same setup as before.
 *
 * NOTE:
 *    This file is not used by CKEditor, you may remove it.
 *    Changing this file will not change your CKEditor configuration.
 */

var CKBUILDER_CONFIG = {
	skin: 'bootstrapck',
	preset: 'basic',
	ignore: [
		'.bender',
		'bender.js',
		'bender-err.log',
		'bender-out.log',
		'dev',
		'.DS_Store',
		'.editorconfig',
		'.gitattributes',
		'.gitignore',
		'gruntfile.js',
		'.idea',
		'.jscsrc',
		'.jshintignore',
		'.jshintrc',
		'less',
		'.mailmap',
		'node_modules',
		'package.json',
		'README.md',
		'tests'
	],
	plugins : {
		'basicstyles' : 1,
		'bbcode' : 1,
		'clipboard' : 1,
		'enterkey' : 1,
		'entities' : 1,
		'indentlist' : 1,
		'list' : 1,
		'pastefromword' : 1,
		'pastetext' : 1,
		'removeformat' : 1,
		'sourcearea' : 1,
		'toolbar' : 1,
		'undo' : 1,
		'wysiwygarea' : 1
	},
	languages : {
		'en' : 1
	}
};

Change History (2)

comment:1 Changed 9 years ago by Marek Lewandowski

Status: newconfirmed

In fact it does look like filter is purposely disabled in BBCode plugin. TBH I have no idea what's the reason for it so it should be investigated deeper.

comment:2 Changed 9 years ago by Marek Lewandowski

Description: modified (diff)
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