import net.pterodactylus.sone.data.Post;
import net.pterodactylus.sone.data.Sone;
+import net.pterodactylus.sone.text.TextFilter;
import net.pterodactylus.sone.web.page.Page.Request.Method;
import net.pterodactylus.util.template.Template;
import net.pterodactylus.util.template.TemplateContext;
if (sender == null) {
sender = getCurrentSone(request.getToadletContext());
}
+ text = TextFilter.filter(request.getHttpRequest().getHeader("host"), text);
webInterface.getCore().createReply(sender, post, text);
throw new RedirectException(returnPage);
}
import net.pterodactylus.sone.data.Post;
import net.pterodactylus.sone.data.Reply;
import net.pterodactylus.sone.data.Sone;
+import net.pterodactylus.sone.text.TextFilter;
import net.pterodactylus.sone.web.WebInterface;
import net.pterodactylus.util.json.JsonObject;
if ((post == null) || (post.getSone() == null)) {
return createErrorJsonObject("invalid-post-id");
}
+ text = TextFilter.filter(request.getHttpRequest().getHeader("host"), text);
Reply reply = webInterface.getCore().createReply(sender, post, text);
return createSuccessJsonObject().put("reply", reply.getId()).put("sone", sender.getId());
}