lib/helper.rb in narou-1.5.6.1 vs lib/helper.rb in narou-1.5.7
- old
+ new
@@ -109,10 +109,10 @@
#
def pretreatment_source(src, encoding = Encoding::UTF_8)
restor_entity(src.force_encoding(encoding)).gsub("\r", "")
end
- ENTITIES = { quot: '"', amp: "&", nbsp: " ", lt: "<", gt: ">", copy: "(c)" }
+ ENTITIES = { quot: '"', amp: "&", nbsp: " ", lt: "<", gt: ">", copy: "(c)", "#39" => "'" }
#
# エンティティ復号
#
def restor_entity(str)
result = str.encode("UTF-16BE", "UTF-8", :invalid => :replace, :undef => :replace, :replace => "?").encode("UTF-8")