[ https://issues.apache.org/jira/browse/WICKET-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597928#action_12597928 ]
pete edited comment on WICKET-1428 at 5/19/08 5:53 AM: ------------------------------------------------------------- Attachments: * wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch * wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch I decided to pick $up$ as a replacement string for '..' because based on RFC 1738 (Uniform Resource Locators) it needs no url encoding at all. The previous suggestion "$^" was converted into "$%5E" in Firefox which is kind of ugly for my taste and would need explicit url encoding and decoding. I wanted to avoid this unnecessary encoding/decoding stuff at all to not bother with different character sets or browser quirks of whatever kind. This should be more reliable and robust in the 100.000 browsers that currently exist. anyway, you can change that sequence using Application.getResourceSettings().setParentFolderPlaceholder("my-favorite-escape-sequence") I did check the patch with ms explorer 6, ms explorer 7, opera 2 and safari 3 which worked well. An example url could now look like /resources/my.great.Class/$up$/$up$/base.css and not be garbled by some browser anymore... There's also a bunch of test cases included in the uploaded patches to test this behavior during regression tests. Would be great if this stuff would make it into 1.4 and 1.3 soon :-) Regards Peter was (Author: pete): Attachments: * wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch * wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch I decided to pick $up$ as a replacement string for '..' because based on RFC 1738 (Uniform Resource Locators) it needs no url encoding at all. The previous suggestion "$^" was converted into "$%5E" in Firefox which is kind of ugly for my taste and would need explicit url encoding and decoding. I wanted to avoid this unnecessary encoding/decoding stuff at all to not bother with different character sets or browser quirks of whatever kind. this should be more reliable and robust and various browsers. anyway, you can change that sequence using Application.getResourceSettings().setParentFolderPlaceholder("my-favorite-escape-sequence") I did check the patch with ms explorer 6, ms explorer 7, opera 2 and safari 3 which worked well. An example url could now look like /resources/my.great.Class/$up$/$up$/base.css and not be garbled by some browser anymore... There's also a bunch of test cases included in the uploaded patches to test this behavior during regression tests. Would be great if this stuff would make it into 1.4 and 1.3 soon :-) Regards Peter > AutoLinkResolver and Parent-Relative (../) Links > ------------------------------------------------ > > Key: WICKET-1428 > URL: https://issues.apache.org/jira/browse/WICKET-1428 > Project: Wicket > Issue Type: New Feature > Components: wicket > Affects Versions: 1.3.2 > Reporter: James Carman > Assignee: Gerolf Seitz > Fix For: 1.4-M3 > > Attachments: > wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch, > wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch, WICKET-1428.patch, > wicket-link-outside-of-package.zip > > > Suppose I have a package structure like this: > com.mycompany.myproject > --- module1 > ------- page > --------- Page1.html > --- module2 > ------- page > --------- Page2.html > If I want to autolink from Page1.html to Page2.html, it would look like: > <wicket:link> > <a href="../../module2/page/Page2.html">Click Here!</a> > </wicket:link> > This is not working, however. The AutoLinkResolver spits out a warning > message: > "WARN - AutoLinkResolver - Did not find corresponding java class: > .....module2.page.Page2" -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.