Opened 11 years ago

Closed 11 years ago

#1484 closed Bug (worksforme)

When a form has a element's name called "style",click "fullscreen" button will raise a error!

Reported by: ntmywzc Owned by:
Priority: Normal Milestone:
Component: General Version: FCKeditor 2.5 Beta
Keywords: Pending WorksForMe Cc:

Description

When a form has a element's name called "style",click "fullscreen" button will raise a error! Version: 2.5 beta 16848, File: fckeditor\editor\_source\internals\fcktools.js, Error at line 457, Context:

FCKTools.ProtectFormStyles = function( formNode )
{
	if ( !formNode || formNode.nodeType != 1 || formNode.tagName.toLowerCase() != 'form' )
		return [] ;
	var hijackRecord = [] ;
	var hijackNames = [ 'style', 'className' ] ;
	for ( var i = 0 ; i < hijackNames.length ; i++ )
	{
		var name = hijackNames[i] ;
		if ( formNode.elements.namedItem( name ) )
		{
			var hijackNode = formNode.elements.namedItem( name ) ;
			hijackRecord.push( [ hijackNode, hijackNode.nextSibling ] ) ;
			formNode.removeChild( hijackNode ) ;
		}
	}
	return hijackRecord ;
}

a sample form:

<form method="POST" name="myform" action="addproduct.asp?action=save">
<input type="text" name="style" value="THIS ELEMENT WILL RAISE THE BUG!">
<textarea name="detail" id="detail" rows="20" cols="50">null...</textarea>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'detail' ) ;
oFCKeditor.BasePath	= '/fckeditor/' ;
oFCKeditor.ReplaceTextarea() ;
}
</script>
</form>

Change History (2)

comment:1 Changed 11 years ago by Alfonso Martínez de Lizarrondo

Keywords: Pending WorksForMe added; name="style" fullscreen removed
Milestone: FCKeditor 2.5

I've tested with Firefox 2, IE6 and IE7 and they work fine. Safari also seems to work fine. Opera seems to have some error using the Fullscreen, but it's not pointing where does it happen and it also happens with the default content, so I don't know if it's related to this ticket at all.

comment:2 Changed 11 years ago by Alfonso Martínez de Lizarrondo

Resolution: worksforme
Status: newclosed

Expired

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy