File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -552,7 +552,8 @@ CompilerProto.compileElement = function (node, root) {
552
552
// non directive attribute, check interpolation tags
553
553
exp = TextParser . parseAttr ( attr . value )
554
554
if ( exp ) {
555
- directive = this . parseDirective ( 'attr' , attr . name + ':' + exp , node )
555
+ directive = this . parseDirective ( 'attr' , exp , node )
556
+ directive . arg = attr . name
556
557
if ( params && params . indexOf ( attr . name ) > - 1 ) {
557
558
// a param attribute... we should use the parent binding
558
559
// to avoid circular updates like size={{size}}
Original file line number Diff line number Diff line change @@ -285,4 +285,18 @@ describe('Misc Features', function () {
285
285
286
286
} )
287
287
288
+ describe ( 'attribute names with colons' , function ( ) {
289
+
290
+ it ( 'should be parsed properly' , function ( ) {
291
+ var t = new Vue ( {
292
+ template : '<use xlink:href="{{icon}}"></use>' ,
293
+ data : {
294
+ icon : 'test'
295
+ }
296
+ } )
297
+ assert . equal ( t . $el . firstChild . getAttribute ( 'xlink:href' ) , 'test' )
298
+ } )
299
+
300
+ } )
301
+
288
302
} )
You can’t perform that action at this time.
0 commit comments