We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2b8ecd2 + 093a47b commit 9a8bc53Copy full SHA for 9a8bc53
lib/jekyll-gist/gist_tag.rb
@@ -9,6 +9,7 @@ module Gist
9
class GistTag < Liquid::Tag
10
11
def render(context)
12
+ @encoding = context.registers[:site].config['encoding'] || 'utf-8'
13
if tag_contents = determine_arguments(@markup.strip)
14
gist_id, filename = tag_contents[0], tag_contents[1]
15
if context.has_key?(gist_id)
@@ -51,6 +52,7 @@ def gist_script_tag(gist_id, filename = nil)
51
52
def gist_noscript_tag(gist_id, filename = nil)
53
code = fetch_raw_code(gist_id, filename)
54
if !code.nil?
55
+ code = code.force_encoding(@encoding)
56
"<noscript><pre>#{CGI.escapeHTML(code)}</pre></noscript>"
57
else
58
Jekyll.logger.warn "Warning:", "The <noscript> tag for your gist #{gist_id} could not"
0 commit comments