Menu

#249 tag.setAttribute() not compatible with <tag/>

v2.0
closed-fixed
5
2007-08-18
2007-07-26
Adam
No

When adding attributes to a <tag/> with a trailing slash, the new attributes are inserted after the trailing slash.

For example, with the following tag:
<input type='text' name='foo'/>

Calling inputTag.setAttribute("value", "bar", '\'');
results in the following HTML:
<input type='text' name='foo'/ value='bar'>

The expected result is:
<input type='text' name='foo' value='bar'/>

If there is a way to achieve my expected result without waiting for a bugfix, please let me know.

Discussion

  • Adam

    Adam - 2007-07-26

    JUnit test case

     
  • Derrick Oswald

    Derrick Oswald - 2007-08-18

    Logged In: YES
    user_id=605407
    Originator: NO

    Handle empty xml tag as a special case in TagNode.setAttribute().

     
  • Derrick Oswald

    Derrick Oswald - 2007-08-18
    • labels: --> Attribute Parsing
    • milestone: 535725 --> v2.0
    • assigned_to: nobody --> derrickoswald
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB