From 67cb0cfb6fd33ae89a0e4ccd7e268976690088ce Mon Sep 17 00:00:00 2001 From: Duncan Beevers Date: Sat, 1 Nov 2014 11:37:12 -0600 Subject: [PATCH] Fix `.` in attribute name with appropriate regexp --- src/htmlparser.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/htmlparser.js b/src/htmlparser.js index 2fd3c06..02d2f41 100644 --- a/src/htmlparser.js +++ b/src/htmlparser.js @@ -32,7 +32,7 @@ 'use strict'; // Regular Expressions for parsing tags and attributes - var singleAttrIdentifier = /([\w:.-]+)/, + var singleAttrIdentifier = /([\w:\.-]+)/, singleAttrAssign = /=/, singleAttrAssigns = [ singleAttrAssign ], singleAttrValues = [ @@ -76,7 +76,7 @@ var customStartTagAttrs; var startTagAttrs = new RegExp( - '(?:\\s*[\\w:.-]+' + '(?:\\s*[\\w:\\.-]+' + '(?:\\s*' + '(?:' + joinSingleAttrAssigns(handler) + ')' + '\\s*(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>\\s]+)' -- 2.34.1