Permalink
Browse files

Fixed UTF-8 encoding bug in content

  • Loading branch information...
sgeo
sgeo committed Mar 26, 2008
1 parent 7bd06a3 commit 0c64656f251558e3992624fd10ae199f3a73619a
View
@@ -1,3 +1,5 @@
+=== Feedtools 0.2.29
+ * fixed bug with utf-8 content in resolve_relative_uris
=== FeedTools 0.2.28
* fixed major bug with autodiscovery
=== FeedTools 0.2.27
@@ -360,7 +360,7 @@ def self.resolve_relative_uris(html, base_uri_sources=[])
if FeedTools.configurations[:sanitization_enabled]
fragments = HTML5::HTMLParser.parse_fragment(
- html, :tokenizer => HTML5::HTMLSanitizer)
+ html, :tokenizer => HTML5::HTMLSanitizer, :encoding => 'UTF-8')
else
fragments = HTML5::HTMLParser.parse_fragment(html)
end
@@ -2,7 +2,7 @@ module FeedTools
module FEED_TOOLS_VERSION #:nodoc:
MAJOR = 0
MINOR = 2
- TINY = 28
+ TINY = 29
STRING = [MAJOR, MINOR, TINY].join('.')
end
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
+ <channel>
+ <title>RockCast Italia</title>
+ <link>http://rockcastitalia.com/</link>
+ <description>novità</description>
+ <generator>Feeder 220 http://reinventedsoftware.com/feeder/</generator>
+ </channel>
+</rss>
@@ -96,4 +96,10 @@ def test_big_5
assert_equal("big5", feed.encoding)
}
end
-end
+
+ def test_utf_content
+ with_feed(:from_file => '/wellformed/encoding/utf8.xml') {|feed|
+ assert_equal("novit\303\240", feed.description)
+ }
+ end
+end

0 comments on commit 0c64656

Please sign in to comment.