File tree 3 files changed +82
-1
lines changed
3 files changed +82
-1
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ module.exports = think.Class(lexer, {
189
189
//get tag attrs
190
190
if ( this . options . tag_attrs && type === TOKEN . HTML_TAG_END ) {
191
191
// 8.1.2.2 in http://www.w3.org/TR/html5/syntax.html
192
- // may be have whitespace in right
192
+ // may be have whitespace at right in end tag
193
193
var tag = ret . slice ( 2 , - 1 ) . trim ( ) ;
194
194
return this . getToken ( type , ret , {
195
195
tag : tag ,
@@ -353,6 +353,8 @@ module.exports = think.Class(lexer, {
353
353
}
354
354
}
355
355
//template syntax in attribute name
356
+ //may be has uppercase chars in template syntax
357
+ //etc: <input <?php echo $NAME;?>name="value" >
356
358
if ( this . containTpl ( item . name ) ) {
357
359
attrs [ i ] . _name = item . name ;
358
360
} else {
Original file line number Diff line number Diff line change 2036
2036
"options" : {},
2037
2037
"key" : " 9800fbd7bb5f315b1809f3413a4d36a1" ,
2038
2038
"result" : " <input name<?= $NAME;?>=welefen>"
2039
+ },
2040
+ "9dec119c065e3d615b4eed0ce90d6123" : {
2041
+ "lang" : " html" ,
2042
+ "name" : " compress" ,
2043
+ "code" : " <input name=\\\" welefen\\\" >" ,
2044
+ "tpl" : " " ,
2045
+ "ld" : " " ,
2046
+ "rd" : " " ,
2047
+ "options" : {},
2048
+ "key" : " 9dec119c065e3d615b4eed0ce90d6123" ,
2049
+ "result" : " <input name=\\\" welefen\\\" >"
2050
+ },
2051
+ "412e62d1be7e060ebf701ac33c974387" : {
2052
+ "lang" : " html" ,
2053
+ "name" : " compress" ,
2054
+ "code" : " <input name=\\\" welefen\\\" value=\" suredy\" >" ,
2055
+ "tpl" : " " ,
2056
+ "ld" : " " ,
2057
+ "rd" : " " ,
2058
+ "options" : {},
2059
+ "key" : " 412e62d1be7e060ebf701ac33c974387" ,
2060
+ "result" : " <input name=\\\" welefen\\\" value=suredy>"
2039
2061
}
2040
2062
}
Original file line number Diff line number Diff line change 11487
11487
]
11488
11488
}
11489
11489
]
11490
+ },
11491
+ "22844d19a323081cebf1d0b14c10017f" : {
11492
+ "lang" : " html" ,
11493
+ "name" : " lexer" ,
11494
+ "code" : " <input name=\\\" welefen\\\" >" ,
11495
+ "tpl" : " " ,
11496
+ "ld" : " " ,
11497
+ "rd" : " " ,
11498
+ "options" : {},
11499
+ "key" : " 22844d19a323081cebf1d0b14c10017f" ,
11500
+ "result" : [
11501
+ {
11502
+ "type" : 256 ,
11503
+ "value" : " <input name=\\\" welefen\\\" >" ,
11504
+ "name" : " HTML_TAG_START" ,
11505
+ "line" : 0 ,
11506
+ "col" : 0 ,
11507
+ "pos" : 0 ,
11508
+ "newlines" : 0 ,
11509
+ "comments" : []
11510
+ }
11511
+ ]
11512
+ },
11513
+ "dd0d5d79fc143e812822dc6f2f00d138" : {
11514
+ "lang" : " html" ,
11515
+ "name" : " lexer" ,
11516
+ "code" : " <input name=\\\" welefen\\\" >" ,
11517
+ "tpl" : " " ,
11518
+ "ld" : " " ,
11519
+ "rd" : " " ,
11520
+ "options" : {
11521
+ "tag_attrs" : true
11522
+ },
11523
+ "key" : " dd0d5d79fc143e812822dc6f2f00d138" ,
11524
+ "result" : [
11525
+ {
11526
+ "type" : 256 ,
11527
+ "value" : " <input name=\\\" welefen\\\" >" ,
11528
+ "name" : " HTML_TAG_START" ,
11529
+ "line" : 0 ,
11530
+ "col" : 0 ,
11531
+ "pos" : 0 ,
11532
+ "newlines" : 0 ,
11533
+ "comments" : [],
11534
+ "tag" : " input" ,
11535
+ "_tag" : " input" ,
11536
+ "attrs" : [
11537
+ {
11538
+ "name" : " name" ,
11539
+ "value" : " \\\" welefen\\\" " ,
11540
+ "quote" : " " ,
11541
+ "_value" : " \\\" welefen\\\" " ,
11542
+ "_name" : " name"
11543
+ }
11544
+ ]
11545
+ }
11546
+ ]
11490
11547
}
11491
11548
}
You can’t perform that action at this time.
0 commit comments