Fix UTF-8

to_html uses source document encoding by default. Set UTF-8.

Add note about KCODE warning.
This commit is contained in:
bootstraponline
2012-11-29 20:05:41 -07:00
parent 9057ec82d8
commit e1a705f975
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -134,7 +134,7 @@ module Precious
def page_header_from_content(content)
doc = build_document(content)
title = find_header_node(doc)
Sanitize.clean(title.to_html).strip unless title.empty?
Sanitize.clean(title.to_html(:encoding => 'UTF-8')).strip unless title.empty?
end
# Returns page content without title if it was extracted.