Project

General

Profile

Actions

Defect #12309

closed

rfpdf fails to include htmlentities gem, even when installed, thus potentially corrupting pdf output

Added by C Tibirna over 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
PDF export
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Duplicate
Affected version:

Description

Situation:
  • redmine 1.4-stable of today (2012-11-05)
  • rfpdf as coming installed with redmine
  • htmlentities-4.3.1 installed
  • wiking r27
Symptoms:
  • 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.
Investigation results:
  • 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 with gem, one has to
    require 'rubygems'
    require 'htmlentities'
    </pre
    Only the second is not enough.

Related issues

Is duplicate of Redmine - Defect #13138: Generating PDF of issue causes UndefinedConversionError with htmlentities gemClosed

Actions
Actions

Also available in: Atom PDF