Hi guys. So I've might have come across a bug in 5.4.22 when trying to add a css class to an element.
The Element#addClassName is deprecated and delegate to Element#attribute where attributes named "class" now gets special treatment. The problem I'm seeing is that Element#attribute overrides the class attribute. In Element#updateAttribute there is a namespace test and looks like it's failing as given namespace is null and attribute namespace is empty string. [1] If I instead provide empty string as namespace in the Element#attribute then the isClass test fails as the namespace is not null. [2] Can anyone confirm the issue - and should I open a JIRA? ---- Element.class#updateAttribute [1] if (cursor.matches(namespace, name)) { [2] boolean isClass = namespace == null && name.equals("class"); if (!(force || isClass)) { return; } cheers Magnus