[DRE-maint] Bug#648756: ruby-htmlentities: Test suite for HtmlEntities fails under Ruby 1.9.1

Paul Battley pbattley at gmail.com
Tue Nov 15 10:14:28 UTC 2011


Hi,

> $ ruby1.9.1 -e 'require "htmlentities"; t=HTMLEntities.new.encode("<élan>"); puts t; puts t.encoding'
> <élan>
> UTF-8

That's the expected behaviour: only the basic entities are escaped by
default, i.e. only that which is necessary to produce valid HTML text.
If you want the encoder to change é, you must tell it to use :decimal,
:hexadecimal, or :named entities, thus:

    >> HTMLEntities.new.encode("<élan>", :named)
    => "<élan>"

This error isn't a serious failure, and may indicate a subtle change
in how Ruby marks string encoding. Which version and patch level of
Ruby is it, and is it really 1.9.1, or is it 1.9.2 with a package name
of 1.9.1 (i.e. what does ruby -v say)?

Paul.






More information about the Pkg-ruby-extras-maintainers mailing list