You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org> on 2005/11/20 17:10:29 UTC

[jira] Commented: (TAPESTRY-244) Template parse errors if unquoted attribute contains a slash

    [ http://issues.apache.org/jira/browse/TAPESTRY-244?page=comments#action_12358095 ] 

Howard M. Lewis Ship commented on TAPESTRY-244:
-----------------------------------------------

Then again, should you REALLY be using templates with unquoted attributes?

> Template parse errors if unquoted attribute contains a slash
> ------------------------------------------------------------
>
>          Key: TAPESTRY-244
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-244
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 3.0.1
>     Reporter: Naeem Malik
>     Assignee: Howard M. Lewis Ship
>     Priority: Minor

>
> If a template for a page has unquoted attributes values containing a "/" character then Tapestry throws template-parsing errors. The errors are usually "missing attribute value" or "unmatched close tag" but others are possible.
> The problem occurs because the TemplateParser class assumes that a "/" character means the end of the current tag (ie a "/>"). The code in the startTag() function uses lines like:
> if (ch == '/' || ch == '>')
>    // do something
> This is incorrect. The fix is to look ahead for the next character if the current character is a slash):
> if((ch == '/' && lookahead(new char[] { '>' })) || ch == '>')
>    // do something
> I have tried the fix and it does resolve the issue. The fix needs to be applied to lines 805 and 870 of TemplateParser.java (in v3.0.1).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org