Factored out the request checking in add_view for TextPlugin