﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
16955	CKeditor generates JS error on 'source' on form element	Steven		"== Steps to reproduce ==

1. Setup a html page with a form element with CKeditor as an inline editor
2. activate the editor on a form element
3. click 'source' button

== Expected result ==
the 'view source' modal

== Actual result ==
An javascript error: TypeError: a.name.replace is not a function

== Other details (browser, OS, CKEditor version, installed plugins) ==
Chrome v57.0.xxxx
[[BR]]
OS: Windows
[[BR]]
https://www.screencast.com/t/aAfZeKNdY
[[BR]]

https://www.screencast.com/t/dPJHLS0lPc
[[BR]]

Build plugins:
plugins : {
		'a11yhelp' : 1,
		'basicstyles' : 1,
		'bidi' : 1,
		'blockquote' : 1,
		'ckawesome' : 1,
		'ckwebspeech' : 1,
		'clipboard' : 1,
		'colorbutton' : 1,
		'colordialog' : 1,
		'contextmenu' : 1,
		'dialogadvtab' : 1,
		'div' : 1,
		'elementspath' : 1,
		'enterkey' : 1,
		'entities' : 1,
		'floatingspace' : 1,
		'font' : 1,
		'format' : 1,
		'forms' : 1,
		'horizontalrule' : 1,
		'html5validation' : 1,
		'htmlwriter' : 1,
		'iframe' : 1,
		'image' : 1,
		'image2' : 1,
		'indentblock' : 1,
		'indentlist' : 1,
		'justify' : 1,
		'language' : 1,
		'lineheight' : 1,
		'link' : 1,
		'list' : 1,
		'liststyle' : 1,
		'magicline' : 1,
		'oembed' : 1,
		'pastefromword' : 1,
		'pastetext' : 1,
		'removeformat' : 1,
		'selectall' : 1,
		'showblocks' : 1,
		'showborders' : 1,
		'smiley' : 1,
		'sourcedialog' : 1,
		'specialchar' : 1,
		'stylescombo' : 1,
		'tab' : 1,
		'table' : 1,
		'tabletools' : 1,
		'toolbar' : 1,
		'undo' : 1,
		'wsc' : 1,
		'wysiwygarea' : 1
	},

Config file:
CKEDITOR.editorConfig = function( config ) {
	// Define changes to default configuration here. For example:
	// config.language = 'fr';
	config.uiColor = '#0181ae';
	config.language = 'en';
	config.allowedContent = {
	    $1: {
	        // Use the ability to specify elements as an object.
	        elements: CKEDITOR.dtd,
	        attributes: true,
	        styles: true,
	        classes: true
	    }
	};
	config.height = '80%';
	config.resize_enabled = true; 
	
	//disallowes onclick etc and script
	config.disallowedContent = 'script; *[on*]; *[javascript:*];vbscript;*[vbscript:*] ';	
	config.enterMode = CKEDITOR.ENTER_BR; 
	config.shiftEnterMode = CKEDITOR.ENTER_P;
	//config.contentsCss = 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css';
	CKEDITOR.dtd.$removeEmpty['span'] = false;

	config.removePlugins = '';
	config.extraPlugins = 'image2,ckawesome,ckwebspeech';

    config.fontawesomePath = 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css';
    config.ckwebspeech = {
        'culture' : 'en-us',
        'commandvoice' : 'command',   //trigger voice commands
        'commands': [                 //command list
            {'newline': 'new line'},            //trigger to add a new line in CKEditor
            {'newparagraph': 'new paragraph'},  //trigger to add a new paragraph in CKEditor
            {'undo': 'undo'},                   //trigger to undo changes in CKEditor
            {'redo': 'redo'}                    //trigger to redo changes in CKEditor
        ]
    };    
    
	if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
		CKEDITOR.tools.enableHtml5Elements( document );	

};"	Bug	closed	Normal		General	4.6.2	invalid	javascript error, source, inline editor	
