WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 GetXhtml() Bug, Al Val, November 12, 2003
     Re:GetXhtml() Bug, Kiwi, November 16, 2003
         Re:GetXhtml() Bug, Erik Arvidsson, November 16, 2003

Subject: Re:GetXhtml() Bug From: Kiwi Date: November 16, 2003
Eriks getXML assumes that the content is valid XML, problem is IE doesn't always conatin valid XML in its DOM ie a node with a tag name of '/h1' is possible.
so the html
<h1> FooTitle </h1></h1> <p>test</p>/
Will produce some very wierd results,
Also forms have a bad habbit of not working properly they seem to move around the DOM at will.
You need to add some error checking to the getXML code checking if the node has a valid tag name ie does not start with '/' and also that each node is only processed once.
code example
 // Check not empty end tag
   if(tagName && tagName.charAt(0) == '/') return ''

To sum it up creating valid XML from the IE DOM can be a nasty job :)

From: Al Val
Sent: November 13, 2003
Subject: Re:GetXhtml() Bug


Sometimes, when I am using getXhtml() it triples my content.
Any Idea Why ?

I did not modify getXhtml in any way.
I am using a <div contenteditable="true">

Thnx, Al.



Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.

View All Messages
Back to WebFX