File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -7,24 +7,19 @@ const OPEN_ANGLE = '<';
77const CLOSE_ANGLE = '>' ;
88const OPEN_ANGLE_SLASH = '</' ;
99const CLOSE_SLASH_ANGLE = '/>' ;
10- const EQUALS_QUOTE = '="' ;
11- const QUOTE = '"' ;
12- const SPACE = ' ' ;
1310
1411function pushAttribute ( xml , name , value ) {
15- xml . push ( SPACE ) ;
16- xml . push ( name ) ;
17- xml . push ( EQUALS_QUOTE ) ;
18- xml . push ( utils . xmlEncode ( value . toString ( ) ) ) ;
19- xml . push ( QUOTE ) ;
12+ xml . push ( ` ${ name } ="${ utils . xmlEncode ( value . toString ( ) ) } "` ) ;
2013}
2114function pushAttributes ( xml , attributes ) {
2215 if ( attributes ) {
16+ const tmp = [ ] ;
2317 _ . each ( attributes , ( value , name ) => {
2418 if ( value !== undefined ) {
25- pushAttribute ( xml , name , value ) ;
19+ pushAttribute ( tmp , name , value ) ;
2620 }
2721 } ) ;
22+ xml . push ( tmp . join ( "" ) ) ;
2823 }
2924}
3025
You can’t perform that action at this time.
0 commit comments