Opened 13 years ago

Closed 13 years ago

#6364 closed Bug (duplicate)

Incorrect behavior when adding template without replacing content

Reported by: Nathan Taylor Owned by:
Priority: Normal Milestone:
Component: General Version: 3.4.1
Keywords: Cc:

Description

In a template definition containing a hidden field, if the template is added to the editor and "Replace actual contents" is unchecked, the HTML rendered does not match the template content; specifically, the hidden fields are replaced with <img /> tags. The template HTML is rendered correctly if "Replace actual contents" is left checked.

Example template:

CKEDITOR.addTemplates('default',
{
    templates:
		[
			{
			    title: 'Test',
			    html: '<input name="HiddenField" type="hidden" value="Value" />'
                 + '<input type="submit" value="Submit" />'
			},
		]
});

When I click on the above template in the template plugin window and leave "Replace actual contents" checked, the editor contains the following HTML:

<p>
<input name="HiddenField" type="hidden" value="Value" /> <input type="submit" value="Submit" /></p>

Now if I leave the above content in place (or delete it- it does not matter) and then add the template again with "Replace actual contents" unchecked, the follow HTML is appended to the editor:

<p>
<img align="" alt="Unkn[[BR]]
own Object" src="../../../../../Content/Js/ckeditor/images/spacer.gif?t=A8LE4JO" /> <input type="submit" value="Submit" /></p>

I do not know if there are any other HTML elements that exhibit this behavior, but the hidden field is one. My guess is that the problem would apply to any element which is rendered as an image in the WYSIWYG view of CKEditor.

Additional testing revealed that this bug appears to be limited to Firefox 3.6.10. It does not occur in Internet Explorer 8, Chrome 3, or Opera 10.

Change History (1)

comment:1 Changed 13 years ago by Sa'ar Zac Elias

Resolution: duplicate
Status: newclosed

DUP of #6275.

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