force encoding to utf-8 when reading the content of a page (#303)
did
committed Oct 26, 2016
commit 1a6105793327b90d1e07a4c637462f90b476b688
Showing 1
changed file with
1 additions
and 1 deletions
locomotive/wagon/commands/sync_sub_commands/sync_pages_command.rb b/lib/locomotive/wagon/commands/sync_sub_commands/sync_pages_command.rb
+1
-1
| @@ | @@ -32,7 +32,7 @@ module Locomotive::Wagon |
| end | |
| def replace_editable_elements(filepath, replacement) | |
| - | content = File.read(File.join(path, filepath)) |
| + | content = File.read(File.join(path, filepath), encoding: 'utf-8') |
| existing = content =~ /\A.*?editable_elements:.*?\n---/m | |
| content.gsub /\A---(.*?)\n---/m do |s| | |