You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Chris Davies (JIRA)" <de...@tapestry.apache.org> on 2007/03/21 16:35:32 UTC
[jira] Created: (TAPESTRY-1380) Page name validation regex is
incorrect.
Page name validation regex is incorrect.
----------------------------------------
Key: TAPESTRY-1380
URL: https://issues.apache.org/jira/browse/TAPESTRY-1380
Project: Tapestry
Issue Type: Bug
Components: Framework
Affects Versions: 4.0.2
Reporter: Chris Davies
Priority: Trivial
The validation regex for page names is slightly incorrect. The error message given by the validator is: "... is not a valid page name. Page names must start with a letter and consist only of letters, numbers, period, dash and underscore."
The regular expression in org.apache.tapestry.parse.SpecificationParser (PAGE_NAME_PATTERN) is:
"^" + IDENTIFIER_PATTERN + "(/" + IDENTIFIER_PATTERN + ")*$";
This does not allow a dash in the page name. A more correct is:
"^" + IDENTIFIER_PATTERN + "(/" + EXTENDED_IDENTIFIER_PATTERN + ")*$";
This still doesn't allow page names with periods or numbers though. I think that ideally, we're looking for something like this (untested): "^[a-zA-Z](/[_\\-\\.]?[a-zA-Z0-9])*$"
Cheers.
- Chris
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Updated: (TAPESTRY-1380) Page name validation regex is
incorrect.
Posted by "Jesse Kuhnert (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jesse Kuhnert updated TAPESTRY-1380:
------------------------------------
Fix Version/s: 4.1.2
> Page name validation regex is incorrect.
> ----------------------------------------
>
> Key: TAPESTRY-1380
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1380
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 4.0.2
> Reporter: Chris Davies
> Priority: Trivial
> Fix For: 4.1.2
>
>
> The validation regex for page names is slightly incorrect. The error message given by the validator is: "... is not a valid page name. Page names must start with a letter and consist only of letters, numbers, period, dash and underscore."
> The regular expression in org.apache.tapestry.parse.SpecificationParser (PAGE_NAME_PATTERN) is:
> "^" + IDENTIFIER_PATTERN + "(/" + IDENTIFIER_PATTERN + ")*$";
> This does not allow a dash in the page name. A more correct is:
> "^" + IDENTIFIER_PATTERN + "(/" + EXTENDED_IDENTIFIER_PATTERN + ")*$";
> This still doesn't allow page names with periods or numbers though. I think that ideally, we're looking for something like this (untested): "^[a-zA-Z](/[_\\-\\.]?[a-zA-Z0-9])*$"
> Cheers.
> - Chris
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Resolved: (TAPESTRY-1380) Page name validation regex is
incorrect.
Posted by "Jesse Kuhnert (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jesse Kuhnert resolved TAPESTRY-1380.
-------------------------------------
Resolution: Fixed
Assignee: Jesse Kuhnert
Sounds good to me. Did the easy part. Maybe a more extensive regexp pattern could be done but it's not bothering me so "eh" .
> Page name validation regex is incorrect.
> ----------------------------------------
>
> Key: TAPESTRY-1380
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1380
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 4.0.2
> Reporter: Chris Davies
> Assigned To: Jesse Kuhnert
> Priority: Trivial
> Fix For: 4.1.2
>
>
> The validation regex for page names is slightly incorrect. The error message given by the validator is: "... is not a valid page name. Page names must start with a letter and consist only of letters, numbers, period, dash and underscore."
> The regular expression in org.apache.tapestry.parse.SpecificationParser (PAGE_NAME_PATTERN) is:
> "^" + IDENTIFIER_PATTERN + "(/" + IDENTIFIER_PATTERN + ")*$";
> This does not allow a dash in the page name. A more correct is:
> "^" + IDENTIFIER_PATTERN + "(/" + EXTENDED_IDENTIFIER_PATTERN + ")*$";
> This still doesn't allow page names with periods or numbers though. I think that ideally, we're looking for something like this (untested): "^[a-zA-Z](/[_\\-\\.]?[a-zA-Z0-9])*$"
> Cheers.
> - Chris
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org