rails 3 fixes
This commit is contained in:
@@ -73,7 +73,7 @@ module ApplicationHelper
|
||||
|
||||
def markup_help
|
||||
return "<div id='markup_help' style='display: none'>" +
|
||||
File.read("#{RAILS_ROOT}/public/static/markup_help.mkd").format_wiki +
|
||||
File.read("#{Rails.root}/public/static/markup_help.mkd").format_wiki +
|
||||
"</div>"
|
||||
end
|
||||
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
class String
|
||||
include ActionView::Helpers::SanitizeHelper
|
||||
def format_wiki
|
||||
text = BlueCloth.new(self).to_html
|
||||
text = Hpricot(text, :xhtml_strict => true).to_s
|
||||
return text.sanitize unless text.blank?
|
||||
return sanitize text
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user