#170 FCKeditor in IE doesn't respect tags namespaces

Version 2.x
closed-fixed
Editor (144)
5
2005-12-23
2005-11-05
No

the problem is that pasting something from word usually
adds nodes with non-html namespaces, also if someone
tries to use special namespaces then they will break
after the serializing.

if the html has:
<o:p></o:p>

then after serializing it becomes
<p></p> (usually with &nbsp; with default fckconfig)
(and it usually gives additional problems as now it can
give an html like this:
<p>content
<p>&nbsp;</p>
</p>
that after loading generates additional empty p and all
becomes nasty)

to fix it change FCKXHtml._AppendNode in
internals\fckxhtml,js adding the namespace if it exists
(gecko already gives the namespace in the node name so
this patch makes IE and Gecko output the same html)

search for this line:
// Create the Element.
var sNodeName = htmlNode.nodeName ;

//Add namespace:
if ( (htmlNode.scopeName) && (htmlNode.scopeName !=
'HTML') )
sNodeName=htmlNode.scopeName + ":" + sNodeName;

so now it outputs again
<o:p></o:p>
so it doesn't change its meaning.

This fix is important to keep the real code of the page
in IE.

Discussion

  • Frederico Caldeira Knabben

    • assigned_to: nobody --> fredck
    • status: open --> open-fixed
     
  • Frederico Caldeira Knabben

    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks