diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index da451fc770..c64d3d109d 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -37,6 +37,7 @@ This is a minor release. * java-errorprone * [#1078](https://github.com/pmd/pmd/issues/1078): \[java] MissingSerialVersionUID rule does not seem to catch inherited classes * jsp + * [#1274](https://github.com/pmd/pmd/issues/1274): \[jsp] Support EL in tag attributes * [#1276](https://github.com/pmd/pmd/issues/1276): \[jsp] add support for jspf and tag extensions * plsql * [#681](https://github.com/pmd/pmd/issues/681): \[plsql] Parse error with Cursor For Loop @@ -49,4 +50,5 @@ This is a minor release. * [#1258](https://github.com/pmd/pmd/pull/1258): \[java] Use typeof in MissingSerialVersionUID - [krichter722](https://github.com/krichter722) * [#1264](https://github.com/pmd/pmd/pull/1264): \[cpp] Fix NullPointerException in CPPTokenizer:99 - [Rafael Cortês](https://github.com/mrfyda) * [#1277](https://github.com/pmd/pmd/pull/1277): \[jsp] #1276 add support for jspf and tag extensions - [Jordi Llach](https://github.com/jordillachmrf) +* [#1275](https://github.com/pmd/pmd/pull/1275): \[jsp] Issue #1274 - Support EL in tag attributes - [Jordi Llach](https://github.com/jordillachmrf) * [#1278](https://github.com/pmd/pmd/pull/1278): \[ci] \[GSoC] Use pmdtester 1.0.0.pre.beta3 - [BBG](https://github.com/djydewang) diff --git a/pmd-jsp/etc/grammar/JspParser.jjt b/pmd-jsp/etc/grammar/JspParser.jjt index 7ea94dcf5f..44481522b2 100644 --- a/pmd-jsp/etc/grammar/JspParser.jjt +++ b/pmd-jsp/etc/grammar/JspParser.jjt @@ -248,7 +248,7 @@ PARSER_END(JspParser) TOKEN : { - > + | "${" ( | )* "}") > | " > : AfterTagState | " | "!>") > : AfterTagState | " > : AfterTagState diff --git a/pmd-jsp/src/test/java/net/sourceforge/pmd/lang/jsp/JspParserTest.java b/pmd-jsp/src/test/java/net/sourceforge/pmd/lang/jsp/JspParserTest.java index 42a020e6b9..df3df0689f 100644 --- a/pmd-jsp/src/test/java/net/sourceforge/pmd/lang/jsp/JspParserTest.java +++ b/pmd-jsp/src/test/java/net/sourceforge/pmd/lang/jsp/JspParserTest.java @@ -33,7 +33,21 @@ public class JspParserTest { "$129.00"); Assert.assertNotNull(node); } - + + @Test + public void testParseELAttribute() { + Node node = parse( + "
Div content here.
"); + Assert.assertNotNull(node); + } + + @Test + public void testParseELAttributeValue() { + Node node = parse( + "
Div content here.
"); + Assert.assertNotNull(node); + } + /** * Verifies bug #311 Jsp parser fails on boolean attribute */