#56 ✓resolved
sean (at msgilligan)

empty XML elements serialized incorrectly

Reported by sean (at msgilligan) | March 10th, 2009 @ 10:41 AM | in 1.0 Release

DOMElement.xml serializes empty XML elements incorrectly.

Note: the original env.js (http://github.com/jeresig/env-js... did handle this more correctly:

get outerHTML(){

  var ret = "<" + this.tagName, attr = this.attributes;

  for ( var i in attr )
    ret += " " + i + "='" + attr[i] + "'";

  if ( this.childNodes.length || this.nodeName == "SCRIPT" )
    ret += ">" + this.childNodes.outerHTML + 
      "</" + this.tagName + ">";
  else
    ret += "/>";

  return ret;
},

Comments and changes to this ticket

  • Thatcher

    Thatcher March 24th, 2009 @ 04:11 PM

    • Tag set to dom, html, script, serialization
    • State changed from “new” to “open”

    ok, got it. There are a number of other cases too. I'm going to dig into this for 0.9.1 (keep you head up for 0.9.0 tonight)

  • Thatcher

    Thatcher September 9th, 2009 @ 06:27 PM

    • Milestone set to 1.0 Release
    • State changed from “open” to “resolved”
    • Assigned user set to “Thatcher”

    this is resolved in 1.0.x

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

a javascript browser environment

People watching this ticket

Pages