Don't rewrite fragment URLs as relative URLs.

git-svn-id: https://svn.apache.org/repos/asf/lenya/branches/BRANCH_2_1_X@1657981 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/modules-core/linking/java/src/org/apache/lenya/cms/linking/RelativeToAbsoluteLinkRewriter.java b/src/modules-core/linking/java/src/org/apache/lenya/cms/linking/RelativeToAbsoluteLinkRewriter.java
index 1d6c50a..10ad4e4 100644
--- a/src/modules-core/linking/java/src/org/apache/lenya/cms/linking/RelativeToAbsoluteLinkRewriter.java
+++ b/src/modules-core/linking/java/src/org/apache/lenya/cms/linking/RelativeToAbsoluteLinkRewriter.java
@@ -36,7 +36,7 @@
 
     public boolean matches(String url) {
         Assert.notNull("url", url);
-        return !url.startsWith("/") && !PROTOCOL_REGEX.matcher(url).find();
+        return !url.startsWith("/") && !url.startsWith("#") && !PROTOCOL_REGEX.matcher(url).find();
     }
 
     public String rewrite(final String url) {