Skip to content

Commit

Permalink
Merge pull request #894 from mikem836/encoding-fix
Browse files Browse the repository at this point in the history
Force UTF-8 encoding
  • Loading branch information
unixmonkey authored Mar 18, 2020
2 parents 046651b + b3618cc commit 41e4a7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Fixes
- None

## [2.0.2] - 2020-03-17
### Fixes
- Force UTF-8 encoding in assets helper

## [2.0.1] - 2020-02-22
### Fixes
- [Replace open-uri with more secure Net:HTTP.get](https://github.com/mileszs/wicked_pdf/pull/864)
Expand Down
1 change: 1 addition & 0 deletions lib/wicked_pdf/wicked_pdf_helper/assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ def read_asset(source)

def read_from_uri(uri)
asset = Net::HTTP.get(URI(uri))
asset.force_encoding('UTF-8') if asset
asset = gzip(asset) if WickedPdf.config[:expect_gzipped_remote_assets]
asset
end
Expand Down

0 comments on commit 41e4a7f

Please sign in to comment.