[jsp] Update grammar to accept boolean attributes

This commit is contained in:
Juan Martín Sotuyo Dodero
2017-06-21 16:45:32 -03:00
parent bede603fb3
commit e1f33504b9
2 changed files with 16 additions and 2 deletions

View File

@ -1,4 +1,8 @@
/*
/*
* Allow boolean attributes
*
* Juan Martín Sotuyo Dodero 06/2017
*====================================================================
* Added capability for Tracking Tokens.
*
* Amit Kumar Prasad 10/2015
@ -580,7 +584,7 @@ void Attribute() :
(
<ATTR_EQ>
AttributeValue()
)
)?
}
/**

View File

@ -29,6 +29,16 @@ public class JspParserTest {
"<span class=\"CostUnit\">$</span><span class=\"CostMain\">129</span><span class=\"CostFrac\">.00</span>");
Assert.assertNotNull(node);
}
/**
* Verifies bug #311 Jsp parser fails on boolean attribute
*/
@Test
public void testParseBooleanAttribute() {
Node node = parse(
"<label><input type='checkbox' checked name=cheese disabled=''> Cheese</label>");
Assert.assertNotNull(node);
}
private Node parse(String code) {
LanguageVersionHandler jspLang = LanguageRegistry.getLanguage(JspLanguageModule.NAME).getDefaultVersion()