Skip to content

Commit

Permalink
Ignore ­, as some blog software (dotclear2) misuse it.
Browse files Browse the repository at this point in the history
  • Loading branch information
lnussbaum committed Jul 27, 2009
1 parent a3c3ef6 commit bc6b5c2
Show file tree
Hide file tree
Showing 7 changed files with 8,282 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ChangeLog
@@ -1,9 +1,10 @@
Ruby-Feedparser 0.7 (10/05/2009) Ruby-Feedparser 0.7 (27/07/2009)
================================ ================================
* Handled several creators per feed item * Handled several creators per feed item
* Fix bug with urls into tag attributes * Fix bug with urls into tag attributes
* Better item categories support * Better item categories support
* Reworked text output formatting * Reworked text output formatting
* Ignore ­, as some blog software (dotclear2) misuse it.


Ruby-Feedparser 0.6 (23/07/2008) Ruby-Feedparser 0.6 (23/07/2008)
================================ ================================
Expand Down
6 changes: 5 additions & 1 deletion lib/feedparser/html2text-parser.rb
Expand Up @@ -399,7 +399,11 @@ def HTML2TextParser.entities
"euro" => 8364 "euro" => 8364
} }
def unknown_entityref(ref) def unknown_entityref(ref)
if HTML_ENTITIES.has_key?(ref) # hack to avoid considering ­, as it is misused by some blog software (dotclear2)
# see http://www.cs.tut.fi/~jkorpela/shy.html
if ref == 'shy'
handle_data('')
elsif HTML_ENTITIES.has_key?(ref)
handle_data([HTML_ENTITIES[ref]].pack('U*')) handle_data([HTML_ENTITIES[ref]].pack('U*'))
else else
handle_data(ref) handle_data(ref)
Expand Down
1,317 changes: 1,317 additions & 0 deletions test/html_output/eolas.output

Large diffs are not rendered by default.

1,085 changes: 1,085 additions & 0 deletions test/parser_output/eolas.output

Large diffs are not rendered by default.

1,297 changes: 1,297 additions & 0 deletions test/source/eolas.xml

Large diffs are not rendered by default.

1,239 changes: 1,239 additions & 0 deletions test/text_output/eolas.output

Large diffs are not rendered by default.

3,337 changes: 3,337 additions & 0 deletions test/textwrapped_output/eolas.output

Large diffs are not rendered by default.

0 comments on commit bc6b5c2

Please sign in to comment.