From 75665c8dc29405c333bbda24e88ecf80cb3d1a2c Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 6 Oct 2011 22:15:35 +0200 Subject: [PATCH] Allow links to images, Sones, and posts. --- src/main/java/net/pterodactylus/sone/web/ImageBrowserPage.java | 10 ++++++++++ src/main/java/net/pterodactylus/sone/web/ViewPostPage.java | 10 ++++++++++ src/main/java/net/pterodactylus/sone/web/ViewSonePage.java | 9 +++++++++ 3 files changed, 29 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/web/ImageBrowserPage.java b/src/main/java/net/pterodactylus/sone/web/ImageBrowserPage.java index ed31283..3afaae6 100644 --- a/src/main/java/net/pterodactylus/sone/web/ImageBrowserPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ImageBrowserPage.java @@ -17,6 +17,8 @@ package net.pterodactylus.sone.web; +import java.net.URI; + import net.pterodactylus.sone.data.Album; import net.pterodactylus.sone.data.Image; import net.pterodactylus.sone.data.Sone; @@ -76,4 +78,12 @@ public class ImageBrowserPage extends SoneTemplatePage { templateContext.set("sone", sone); } + /** + * {@inheritDoc} + */ + @Override + public boolean isLinkExcepted(URI link) { + return true; + } + } diff --git a/src/main/java/net/pterodactylus/sone/web/ViewPostPage.java b/src/main/java/net/pterodactylus/sone/web/ViewPostPage.java index 4cc9864..d0ca904 100644 --- a/src/main/java/net/pterodactylus/sone/web/ViewPostPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ViewPostPage.java @@ -17,6 +17,8 @@ package net.pterodactylus.sone.web; +import java.net.URI; + import net.pterodactylus.sone.data.Post; import net.pterodactylus.sone.template.SoneAccessor; import net.pterodactylus.sone.web.page.FreenetRequest; @@ -75,4 +77,12 @@ public class ViewPostPage extends SoneTemplatePage { templateContext.set("raw", raw); } + /** + * {@inheritDoc} + */ + @Override + public boolean isLinkExcepted(URI link) { + return true; + } + } diff --git a/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java b/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java index 5fe356d..57d4070 100644 --- a/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java +++ b/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java @@ -17,6 +17,7 @@ package net.pterodactylus.sone.web; +import java.net.URI; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -115,4 +116,12 @@ public class ViewSonePage extends SoneTemplatePage { templateContext.set("repliedPosts", repliedPostPagination.getItems()); } + /** + * {@inheritDoc} + */ + @Override + public boolean isLinkExcepted(URI link) { + return true; + } + } -- 2.7.4