Skip to content

Commit

Permalink
- allow : in attribute names (like xml:lang)
Browse files Browse the repository at this point in the history
  • Loading branch information
aredridel committed May 27, 2010
1 parent cc8e3a1 commit 481dc4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/level1/core.js
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 481dc4d

Please sign in to comment.