rfpdf fails to include htmlentities gem, even when installed, thus potentially corrupting pdf output
- redmine 1.4-stable of today (2012-11-05)
- rfpdf as coming installed with redmine
- htmlentities-4.3.1 installed
- wiking r27
- wiking has a few default behaviors for replacing quotes ("'"), short and long dashes with their htmlentities representations:
- ' => ’
- -- => –
- --- => —
- rfpdf should convert these htmlentities back to UTF characters, but fails
- results a PDF output which, e.g. in French, it's barely readable (
"it's" ==> "it’s; "je l'ai" => "je l’ai") etc.
- it came out that rfpdf fails to load the
htmlentitiesgem. There is code to (optionnaly) do it in rfpdf/init.rb, but, even when htmlentities is correctly installed, the loading of that module fails.
- in the local configuration, in order to load
htmlentitiesas installed with
gem, one has to
require 'rubygems' require 'htmlentities'Only the second is not enough.
#2 Updated by Jean-Philippe Lang almost 5 years ago
- Resolution set to Cant reproduce
C Tibirna wrote:
wiking has a few default behaviors for replacing quotes ("'"), short and long dashes with their htmlentities representations
I'm not aware of that, do you use the default textile formetter?.
And does anybody reproduces this problem?
#3 Updated by C Tibirna almost 5 years ago
Oh, sorry, my bad. I managed to undertone a lot the fact that I am using the wiking plugin an this is the required first step.
But the bug is not the fault of wiking (it does its job as advertised). It's rfpdf that fails to decode html containing certain entities. Theoretically one can write those entities by hand in a redmine wiki document (as I did in the initial report) and then, trying to save that wiki page to pdf will render it "corrupted".
I wish and hope I did a better job at the rest of my report. Thanks for your understanding.