Menu

#46 null prepended to XDefaultStyle attribute

closed
nobody
None
1
2015-01-10
2014-09-10
No

HTMLNorm.attributesToStyle(Node, String) prepends a null; to the XDefaultStyle attribute.

if (attrs.length() > 0)
    el.setAttribute("XDefaultStyle", el.getAttribute("XDefaultStyle") + ";" + attrs);

as we can see in the code above if the value returned by el.getAttribute("XDefaultStyle") is null then that will become the part of the value along with the ;

Discussion

  • Radek Burget

    Radek Burget - 2014-09-25

    According to the original W3C specification, getAttribute() should return empty string when the attribute is not set. However, new versions of the specification requires returning null. This difference could affect jStyleParser and CSSBox at many points. Hopefully, I have fixed all of them but further testing is necessary.

     
  • Radek Burget

    Radek Burget - 2014-09-25
    • status: open --> accepted
     
  • Chetan Kothari

    Chetan Kothari - 2014-09-26

    Thanks Radek.

     
  • Radek Burget

    Radek Burget - 2015-01-10
    • status: accepted --> closed
     
  • Radek Burget

    Radek Burget - 2015-01-10

    Closed in 1.19

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.