Menu

#240 Behaviour on unknown tags depends on capitalization of letters

v2.29
open
nobody
None
5
2024-04-10
2024-04-10
No

Since version 2.19, the behaviour (without any behaviour modificatoins) on unknown tags is different depending on letter capitalization. This was not the case in versions 2.18- and is very counterintuitive.

val s = "<html><body><p><atag>1</atag><b>2</b></p></body></html>"
println(HtmlCleaner().clean(s).getElementsByName("p", true)[0].childTagList)
// [atag, b]

// Changed only atag -> aTag
val s = "<html><body><p><aTag>1</aTag><b>2</b></p></body></html>"
println(HtmlCleaner().clean(s).getElementsByName("p", true)[0].childTagList)
// [aTag]

Please fix it, so that behaviour on these two samples is consistent.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB