[HtmlUnit] SVN: [14416] trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/ javascript/host/Element.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[HtmlUnit] SVN: [14416] trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/ javascript/host/Element.java

asashour-2
Revision: 14416
          http://sourceforge.net/p/htmlunit/code/14416
Author:   asashour
Date:     2017-05-08 07:43:48 +0000 (Mon, 08 May 2017)
Log Message:
-----------
Fix case sensitivity of event handlers

Modified Paths:
--------------
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Element.java

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Element.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Element.java 2017-05-08 07:41:25 UTC (rev 14415)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Element.java 2017-05-08 07:43:48 UTC (rev 14416)
@@ -132,7 +132,7 @@
          */
         final DomElement htmlElt = (DomElement) domNode;
         for (final DomAttr attr : htmlElt.getAttributesMap().values()) {
-            final String eventName = attr.getName();
+            final String eventName = attr.getName().toLowerCase(Locale.ROOT);
             if (eventName.startsWith("on")) {
                 createEventHandler(eventName.substring(2), attr.getValue());
             }


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop