Defect #12309
closedrfpdf fails to include htmlentities gem, even when installed, thus potentially corrupting pdf output
0%
Description
- 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
htmlentities
gem. 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
htmlentities
as installed withgem
, one has torequire 'rubygems' require 'htmlentities' </pre
Only the second is not enough.
Related issues
Updated by C Tibirna about 12 years ago
Heh, the default html code conversion tricked me. Please read:
- ' => &
rsquo
;- -- => &
ndash
;- --- => &
mdash
;
results a PDF output which, e.g. in French, it's barely readable ( "it's" ==> "it&
rsquo
;s and "je l'ai" => "je l&rsquo
;ai") etc.
Updated by Jean-Philippe Lang about 12 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?
Updated by C Tibirna about 12 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.
Updated by Toshi MARUYAMA almost 12 years ago
- Status changed from New to Closed
- Resolution changed from Cant reproduce to Duplicate
As #13138#note-4, this issue is duplicate.