Detectando erros de sintaxe no preview
This commit is contained in:
@@ -112,7 +112,11 @@ class WikiController < ApplicationController
|
||||
|
||||
def preview
|
||||
@text = params[:text]
|
||||
render :text => BlueCloth.new(@text).to_html
|
||||
begin
|
||||
render :text => BlueCloth.new(@text).to_html
|
||||
rescue
|
||||
render :text => $!.to_s.gsub(">", ">").gsub("<", "<")
|
||||
end
|
||||
end
|
||||
|
||||
def diff
|
||||
|
||||
Reference in New Issue
Block a user