Detectando erros de sintaxe no preview
This commit is contained in:
@@ -112,7 +112,11 @@ class WikiController < ApplicationController
|
|||||||
|
|
||||||
def preview
|
def preview
|
||||||
@text = params[:text]
|
@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
|
end
|
||||||
|
|
||||||
def diff
|
def diff
|
||||||
|
|||||||
Reference in New Issue
Block a user