AttributeValueDouble ::= (QuotedChar - '"') ('"' | <TRANSLATION_ERROR>) RTAttributeValueDouble ::= ((QuotedChar - '"') - ((QuotedChar-'"')'%>"') ('%>"' | TRANSLATION_ERROR)
(String qName, String watch, boolean ignoreEL)
| 252 | * ((QuotedChar - '"')* - ((QuotedChar-'"')'%>"') ('%>"' | TRANSLATION_ERROR) |
| 253 | */ |
| 254 | private String parseAttributeValue(String qName, String watch, boolean ignoreEL) throws JasperException { |
| 255 | boolean quoteAttributeEL = ctxt.getOptions().getQuoteAttributeEL(); |
| 256 | Mark start = reader.mark(); |
| 257 | // In terms of finding the end of the value, quoting EL is equivalent to |
| 258 | // ignoring it. |
| 259 | Mark stop = reader.skipUntilIgnoreEsc(watch, ignoreEL || quoteAttributeEL); |
| 260 | if (stop == null) { |
| 261 | err.jspError(start, "jsp.error.attribute.unterminated", qName); |
| 262 | } |
| 263 | |
| 264 | String ret = null; |
| 265 | try { |
| 266 | char quote = watch.charAt(watch.length() - 1); |
| 267 | |
| 268 | // If watch is longer than 1 character this is a scripting |
| 269 | // expression and EL is always ignored |
| 270 | boolean isElIgnored = pageInfo.isELIgnored() || watch.length() > 1; |
| 271 | |
| 272 | ret = AttributeParser.getUnquoted(reader.getText(start, stop), quote, isElIgnored, |
| 273 | pageInfo.isDeferredSyntaxAllowedAsLiteral(), ctxt.getOptions().getStrictQuoteEscaping(), |
| 274 | quoteAttributeEL); |
| 275 | } catch (IllegalArgumentException iae) { |
| 276 | err.jspError(start, iae.getMessage()); |
| 277 | } |
| 278 | if (watch.length() == 1) { |
| 279 | return ret; |
| 280 | } |
| 281 | |
| 282 | // Put back delimiter '<%=' and '%>', since they are needed if the |
| 283 | // attribute does not allow RTexpression. |
| 284 | return "<%=" + ret + "%>"; |
| 285 | } |
| 286 | |
| 287 | private String parseScriptText(String tx) { |
| 288 | CharArrayWriter cw = new CharArrayWriter(); |
no test coverage detected