Don't evaluate ERB in the ujs test server

This commit is contained in:
Aaron Patterson 2020-10-06 12:14:22 -07:00
parent d71291cb3c
commit b001cbefa7
No known key found for this signature in database
GPG Key ID: 953170BCB4FFAFC6
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ class TestsController < ActionController::Base
data = { params: params.to_unsafe_h }.update(request.env)
if params[:content_type] && params[:content]
render inline: params[:content], content_type: params[:content_type]
render plain: params[:content], content_type: params[:content_type]
elsif request.xhr?
if params[:with_xhr_redirect]
response.set_header("X-Xhr-Redirect", "http://example.com/")