Comparing version 1.0.5 to 1.0.6
@@ -151,3 +151,3 @@ var VAR = 0, TEXT = 1, OPEN = 2, CLOSE = 3, ATTR = 4 | ||
state = ATTR | ||
} else if (state === ATTR_VALUE_SQ && c === '"') { | ||
} else if (state === ATTR_VALUE_SQ && c === "'") { | ||
res.push([ATTR_VALUE,reg]) | ||
@@ -207,3 +207,3 @@ reg = '' | ||
'source', 'track', 'wbr' | ||
].join('|') + ')$') | ||
].join('|') + ')(?:[\.#][a-zA-Z0-9\u007F-\uFFFF_:-]+)*$') | ||
function selfClosing (tag) { return closeRE.test(tag) } |
{ | ||
"name": "hyperx", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "tagged template string virtual dom builder", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -6,3 +6,3 @@ var test = require('tape') | ||
test('escape', function (t) { | ||
test('escape double quotes', function (t) { | ||
var value = '">' | ||
@@ -16,1 +16,11 @@ var tree = hx`<input type="text" value="${value}"></h1>` | ||
}) | ||
test('escape single quotes', function (t) { | ||
var value = "'>" | ||
var tree = hx`<input type='text' value='${value}'></h1>` | ||
t.equal( | ||
vdom.create(tree).toString(), | ||
`<input type="text" value="'>" />` | ||
) | ||
t.end() | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21365
28
520