We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf42c15 commit f6f9ea4Copy full SHA for f6f9ea4
src/parsers/template.js
@@ -74,7 +74,7 @@ function isRealTemplate (node) {
74
return isTemplate(node) && isFragment(node.content)
75
}
76
77
-const tagRE = /<([\w:]+)/
+const tagRE = /<([\w:-]+)/
78
const entityRE = /&#?\w+?;/
79
80
/**
test/unit/specs/misc_spec.js
@@ -525,4 +525,16 @@ describe('Misc', function () {
525
done()
526
527
})
528
+
529
+ // #2500
530
+ it('template parser tag match should include hyphen', function () {
531
+ var vm = new Vue({
532
+ el: document.createElement('div'),
533
+ template: '<div>{{{ test }}}</div>',
534
+ data: {
535
+ test: '<image-field></image-field>'
536
+ }
537
+ })
538
+ expect(vm.$el.querySelector('image-field').namespaceURI).not.toMatch(/svg/)
539
540
0 commit comments