try to make a relative path, problem is still that if that is not
possible a full path will be send to the guard.
diff --git a/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java b/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java
index 398336a..931fdab 100644
--- a/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java
+++ b/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java
@@ -417,6 +417,22 @@
 		if (resourceStream instanceof IFixedLocationResourceStream)
 		{
 			realPath = ((IFixedLocationResourceStream)resourceStream).locationAsString();
+			if (realPath != null)
+			{
+				int index = realPath.indexOf(path);
+				if (index != -1)
+				{
+					realPath = realPath.substring(index);
+				}
+				else
+					// TODO just fall back on the full path without a scope..
+					return guard.accept(null, realPath);
+			}
+			else
+			{
+				realPath = path;
+			}
+
 		}
 		return guard.accept(scope, realPath);
 	}
diff --git a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
index 59ce896..996617c 100644
--- a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
+++ b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
@@ -835,6 +835,7 @@
 	{
 		try
 		{
+			// todo, should there be a better check? because this call already fails..
 			tester.startPage(BlockedResourceLinkPage.class);
 
 			TagTester linkTag = TagTester.createTagByAttribute(tester.getLastResponseAsString(),
@@ -855,6 +856,40 @@
 		// assertNull(getRequestCodingStrategy());
 	}
 
+	/**
+	 * Test that clickLink on a ResourceLink with a ResourceReference on it works.
+	 * 
+	 * <p>
+	 * See also WICKET-280 Allow to access html resources
+	 * </p>
+	 */
+	@Test
+	public void clickResourceLinkWithSomeCommaAppendedUrl()
+	{
+		try
+		{
+			// todo, should there be a better check? because this call already fails..
+			tester.startPage(BlockedResourceLinkPage.class);
+
+			TagTester linkTag = TagTester.createTagByAttribute(tester.getLastResponseAsString(),
+				"wicket:id", "link");
+			String url = linkTag.getAttribute("href");
+			url = url.replace("../", "wicket/");
+			url += ",xml";
+			tester.executeUrl(url);
+			fail("Accessing " + BlockedResourceLinkPage.class + " should have raised a " +
+				PackageResourceBlockedException.class);
+		}
+		catch (PackageResourceBlockedException e)
+		{
+// e.printStackTrace();
+		}
+
+		tester.startPage(MockResourceLinkPage.class);
+		tester.clickLink("link");
+		// assertNull(getRequestCodingStrategy());
+	}
+
 // IRequestTargetUrlCodingStrategy getRequestCodingStrategy()
 // {
 // String relativePath = tester.getApplication().getWicketFilter().getRelativePath(