Skip to content

Commit

Permalink
Assert namespaced attribute with digit
Browse files Browse the repository at this point in the history
Closes #2236
  • Loading branch information
jhy committed Nov 29, 2024
1 parent 0a4b830 commit bf13b49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/java/org/jsoup/parser/XmlTreeBuilderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,12 @@ public void handlesLTinScript() {
}

@Test void xmlValidAttributes() {
String xml = "<a bB1-_:.=foo _9!=bar>One</a>";
String xml = "<a bB1-_:.=foo _9!=bar xmlns:p1=qux>One</a>";
Document doc = Jsoup.parse(xml, Parser.xmlParser());
assertEquals(Syntax.xml, doc.outputSettings().syntax());

String out = doc.html();
assertEquals("<a bB1-_:.=\"foo\" _9_=\"bar\">One</a>", out); // first is same, second coerced
assertEquals("<a bB1-_:.=\"foo\" _9_=\"bar\" xmlns:p1=\"qux\">One</a>", out); // first is same, second coerced
}

@Test void customTagsAreFlyweights() {
Expand Down

0 comments on commit bf13b49

Please sign in to comment.