Files
danbooru/app/controllers/note_previews_controller.rb
evazion a7dc05ce63 Enable frozen string literals.
Make all string literals immutable by default.
2021-12-14 21:33:27 -06:00

15 lines
304 B
Ruby

# frozen_string_literal: true
class NotePreviewsController < ApplicationController
respond_to :json
def show
@body = NoteSanitizer.sanitize(params[:body].to_s)
respond_with(@body) do |format|
format.json do
render :json => {:body => @body}.to_json
end
end
end
end