WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 richedit getXHTML bug, andot, October 25, 2002
     Re:richedit getXHTML bug, Erik Arvidsson, October 25, 2002
         Re:richedit getXHTML bug, andot, October 26, 2002
             Re:richedit getXHTML bug, Erik Arvidsson, October 27, 2002
                 Re:richedit getXHTML bug , andot, October 28, 2002
                     Re:richedit getXHTML bug , Erik Arvidsson, October 28, 2002
                 Re:richedit getXHTML bug, andot, October 28, 2002
             Re:richedit getXHTML bug, Erik Arvidsson, October 27, 2002
                 Re:richedit getXHTML bug, andot, October 28, 2002

Subject: richedit getXHTML bug From: andot Date: October 25, 2002

when I use event Attribute in the HTML tags, just like 
  <button onclick="if (something>0) alert('wrong!');">ok</button>
, the getXHTML method always fix the ">" into "&gt;", but it fix wrong.  I think the event Attribute needn't to fix, so I modify the function _appendNodeXHTML(node, sb) in js/getxhtml.js. the following is modified part,

      for (var i = 0; i < l; i++) {
        if (attrs[i].specified) {
          if (attrs[i].nodeName != "style") {
            sb.append(" " + (attrs[i].expando ? attrs[i].nodeName : attrs[i].nodeName.toLowerCase()) +
              "=\"" + ((attrs[i].nodeName.substring(0, 2) == "on") ? attrs[i].nodeValue : _fixAttribute(attrs[i].nodeValue)) + "\"");
          }
          else sb.append(" style=\"" + _fixAttribute(node.style.cssText).toLowerCase() + "\"");
        }
      }




Reply
Name: 
Email: 
Subject: 

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