From: David ‘Bombe’ Roden Date: Thu, 6 Oct 2011 20:15:35 +0000 (+0200) Subject: Allow links to images, Sones, and posts. X-Git-Tag: 0.7.3^2~17^2~1 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=75665c8dc29405c333bbda24e88ecf80cb3d1a2c;p=Sone.git Allow links to images, Sones, and posts. --- 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; + } + }