Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix encoding error for gist_tag #23

Merged
merged 3 commits into from
Oct 24, 2015
Merged

Fix encoding error for gist_tag #23

merged 3 commits into from
Oct 24, 2015

Conversation

akerl
Copy link
Contributor

@akerl akerl commented Oct 23, 2015

This should fix #18 and #22 by ensuring gists are loaded into the same encoding as the site itself

@@ -69,7 +70,7 @@ def fetch_raw_code(gist_id, filename = nil)
read_timeout: 3, open_timeout: 3) do |http|
request = Net::HTTP::Get.new uri.to_s
response = http.request(request)
response.body
response.body.force_encoding(@encoding)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think GitHub always sends back UTF-8. Maybe @benbalter can help with this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps, but if the Jekyll user sets their site to use something else, and jekyll-gist returns utf-8, is Liquid not going to error out as it is now, with the mix of utf-8 and ascii 8bit?

parkr added a commit that referenced this pull request Oct 24, 2015
@parkr parkr merged commit 9a8bc53 into jekyll:master Oct 24, 2015
parkr added a commit that referenced this pull request Oct 24, 2015
@parkr
Copy link
Member

parkr commented Oct 24, 2015

Released in v1.3.5! Thanks :) https://github.com/jekyll/jekyll-gist/releases/tag/v1.3.5

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The noscript tag generates encoding error within Liquid
3 participants