Add filter to pipe arbitrary text through the link parser.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / WebInterface.java
index adcc17e..92aa998 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;
@@ -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));