diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index 5464b74..c1d5993 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -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