Permalink
Browse files

Fix for initalization failure in pages served as application/xhtml+xml.

The root cause is a case mismatch in the tag comparision when parsing
select options. Converting the tag name to uppercase ensures that the
comparision succeeds in all doc types.
  • Loading branch information...
1 parent dc024d7 commit f9390b810818618928e63d187d155688f41eaffd @phaas phaas committed Jul 13, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 coffee/lib/select-parser.coffee
@@ -5,7 +5,7 @@ class SelectParser
@parsed = []
add_node: (child) ->
- if child.nodeName is "OPTGROUP"
+ if child.nodeName.toUpperCase() is "OPTGROUP"
this.add_group child
else
this.add_option child
@@ -21,7 +21,7 @@ class SelectParser
this.add_option( option, group_position, group.disabled ) for option in group.childNodes
add_option: (option, group_position, group_disabled) ->
- if option.nodeName is "OPTION"
+ if option.nodeName.toUpperCase() is "OPTION"
if option.text != ""
if group_position?
@parsed[group_position].children += 1

0 comments on commit f9390b8

Please sign in to comment.