From 481dc4d517b0e3b246e2bc0a07a95b31a31a998a Mon Sep 17 00:00:00 2001 From: Aria Stewart Date: Wed, 26 May 2010 19:10:07 -0600 Subject: [PATCH] - allow : in attribute names (like xml:lang) --- lib/level1/core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/level1/core.js b/lib/level1/core.js index 57b486976b..3b16523b6c 100644 --- a/lib/level1/core.js +++ b/lib/level1/core.js @@ -1035,7 +1035,7 @@ core.Document.prototype = { get readonly() { return this._readonly; }, /* returns Element */ createElement: function(/* string */ tagName) { - if (!tagName || !tagName.match || tagName.match(/[^\w\d_-]+/i)) { + if (!tagName || !tagName.match || tagName.match(/[^\w:\d_-]+/i)) { throw new core.DOMException(INVALID_CHARACTER_ERR); } @@ -1099,7 +1099,7 @@ core.Document.prototype = { /* returns Attr */ createAttribute: function(/* string */ name) { - if (!name || !name.length || name.match(/[^\w\d_-]+/) ) { + if (!name || !name.length || name.match(/[^\w:\d_-]+/) ) { throw new core.DOMException(INVALID_CHARACTER_ERR); } return new core.Attr(this, name,false);