commit | f5550ef4540f2b4d5b127c2d3915ace13d647715 | [log] [tgz] |
---|---|---|
author | Andreas Hartmann <andreas@apache.org> | Fri Feb 06 22:33:17 2015 +0000 |
committer | Andreas Hartmann <andreas@apache.org> | Fri Feb 06 22:33:17 2015 +0000 |
tree | 9795abfa2750faaa5aa7d5f8f2b53d31b68fe736 | |
parent | 09e8be24a261497936100553f615ae72405494cf [diff] |
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) {