lib/gollum-site/markup.rb in gollum-site-0.1.6 vs lib/gollum-site/markup.rb in gollum-site-0.1.7
- old
+ new
@@ -3,10 +3,15 @@
# Removing sanitization; this will be configurable after Gollum 1.1.0
def render(no_follow = false)
sanitize_options = no_follow ?
HISTORY_SANITIZATION_OPTIONS :
SANITIZATION_OPTIONS
- data = extract_tex(@data)
+ if @data.respond_to?(:force_encoding)
+ data = @data.force_encoding('UTF-8')
+ else
+ data = @data
+ end
+ data = extract_tex(data)
data = extract_code(data)
data = extract_tags(data)
begin
data = GitHub::Markup.render(@name, data)
if data.nil?