Use new parser filter for posts and replies, too.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / WebInterface.java
index adcc17e..8eb35e3 100644 (file)
@@ -50,6 +50,7 @@ import net.pterodactylus.sone.template.GetPagePlugin;
 import net.pterodactylus.sone.template.IdentityAccessor;
 import net.pterodactylus.sone.template.JavascriptFilter;
 import net.pterodactylus.sone.template.NotificationManagerAccessor;
+import net.pterodactylus.sone.template.ParserFilter;
 import net.pterodactylus.sone.template.PostAccessor;
 import net.pterodactylus.sone.template.ReplyAccessor;
 import net.pterodactylus.sone.template.RequestChangeFilter;
@@ -169,8 +170,8 @@ public class WebInterface implements CoreListener {
                templateFactory.addAccessor(Object.class, new ReflectionAccessor());
                templateFactory.addAccessor(Collection.class, new CollectionAccessor());
                templateFactory.addAccessor(Sone.class, new SoneAccessor(getCore()));
-               templateFactory.addAccessor(Post.class, new PostAccessor(getCore(), templateFactory));
-               templateFactory.addAccessor(Reply.class, new ReplyAccessor(getCore(), templateFactory));
+               templateFactory.addAccessor(Post.class, new PostAccessor(getCore()));
+               templateFactory.addAccessor(Reply.class, new ReplyAccessor(getCore()));
                templateFactory.addAccessor(Identity.class, new IdentityAccessor(getCore()));
                templateFactory.addAccessor(NotificationManager.class, new NotificationManagerAccessor());
                templateFactory.addAccessor(Trust.class, new TrustAccessor());
@@ -182,6 +183,7 @@ public class WebInterface implements CoreListener {
                templateFactory.addFilter("match", new MatchFilter());
                templateFactory.addFilter("css", new CssClassNameFilter());
                templateFactory.addFilter("js", new JavascriptFilter());
+               templateFactory.addFilter("parse", new ParserFilter(templateFactory));
                templateFactory.addPlugin("getpage", new GetPagePlugin());
                templateFactory.addPlugin("paginate", new PaginationPlugin());
                templateFactory.setTemplateProvider(new ClassPathTemplateProvider(templateFactory));