From 6f0e0ad649a2e62ba6a367e1a3706849a07f2175 Mon Sep 17 00:00:00 2001 From: Andrew Dupont Date: Wed, 19 Dec 2007 23:32:21 +0000 Subject: [PATCH] Handle case-sensitivity in Selector tag names better. Closes #5052. [mexx, Andrew Dupont] --- CHANGELOG | 4 ++++ src/selector.js | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 819f926..5fd9a12 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +*SVN* + +* Handle case-sensitivity in Selector tag names better. Closes #5052. [mexx, Andrew Dupont] + *1.6.0.1* (December 4, 2007) * Change document.viewport.getDimensions to exclude scrollbars in all cases. Closes #10148, #9288. [Nick Stackenburg] diff --git a/src/selector.js b/src/selector.js index f49d539..b5814d6 100644 --- a/src/selector.js +++ b/src/selector.js @@ -396,7 +396,7 @@ Object.extend(Selector, { // TOKEN FUNCTIONS tagName: function(nodes, root, tagName, combinator) { - tagName = tagName.toUpperCase(); + var uTagName = tagName.toUpperCase(); var results = [], h = Selector.handlers; if (nodes) { if (combinator) { @@ -409,7 +409,7 @@ Object.extend(Selector, { if (tagName == "*") return nodes; } for (var i = 0, node; node = nodes[i]; i++) - if (node.tagName.toUpperCase() == tagName) results.push(node); + if (node.tagName.toUpperCase() === uTagName) results.push(node); return results; } else return root.getElementsByTagName(tagName); },