private final ElementLoader elementLoader;
private final LinkedElementRenderFilter linkedElementRenderFilter;
private final TimeTextConverter timeTextConverter = new TimeTextConverter();
- private final L10nFilter l10nFilter = new L10nFilter(this);
+ private final L10nFilter l10nFilter;
/** The “new Sone” notification. */
private final ListNotification<Sone> newSoneNotification;
this.elementLoader = elementLoader;
formPassword = sonePlugin.pluginRespirator().getToadletContainer().getFormPassword();
soneTextParser = new SoneTextParser(getCore(), getCore());
+ l10nFilter = new L10nFilter(getL10n());
templateContextFactory = new TemplateContextFactory();
templateContextFactory.addAccessor(Object.class, new ReflectionAccessor());
templateContextFactory.addFilter("html", new HtmlFilter());
templateContextFactory.addFilter("replace", new ReplaceFilter());
templateContextFactory.addFilter("store", new StoreFilter());
- templateContextFactory.addFilter("l10n", new L10nFilter(this));
+ templateContextFactory.addFilter("l10n", l10nFilter);
templateContextFactory.addFilter("substring", new SubstringFilter());
templateContextFactory.addFilter("xml", new XmlFilter());
templateContextFactory.addFilter("change", new RequestChangeFilter());
templateContextFactory.addFilter("js", new JavascriptFilter());
templateContextFactory.addFilter("parse", parserFilter = new ParserFilter(getCore(), soneTextParser));
templateContextFactory.addFilter("shorten", shortenFilter = new ShortenFilter());
- templateContextFactory.addFilter("render", renderFilter = new RenderFilter(getCore(), templateContextFactory));
+ templateContextFactory.addFilter("render", renderFilter = new RenderFilter(getCore(), soneTextParser, new HtmlFilter()));
templateContextFactory.addFilter("linked-elements", new LinkedElementsFilter(elementLoader));
templateContextFactory.addFilter("render-linked-element", linkedElementRenderFilter = new LinkedElementRenderFilter(templateContextFactory));
templateContextFactory.addFilter("reparse", new ReparseFilter());
templateContextFactory.addFilter("unknown", new UnknownDateFilter(getL10n(), "View.Sone.Text.UnknownDate"));
templateContextFactory.addFilter("format", new FormatFilter());
templateContextFactory.addFilter("sort", new CollectionSortFilter());
- templateContextFactory.addFilter("image-link", new ImageLinkFilter(getCore(), templateContextFactory));
+ templateContextFactory.addFilter("image-link", new ImageLinkFilter(getCore()));
templateContextFactory.addFilter("replyGroup", new ReplyGroupFilter());
templateContextFactory.addFilter("in", new ContainsFilter());
templateContextFactory.addFilter("unique", new UniqueElementFilter());