Fix another part of #435578: decode HTML entities in TCPDF title
authorJoao Ventura
Sat, 2 May 2009 22:17:10 +0000 (22:17 +0000)
committerJoao Ventura
Sat, 2 May 2009 22:17:10 +0000 (22:17 +0000)
print_pdf/print_pdf.pages.inc

index 067639b..df0464d 100644 (file)
@@ -206,7 +206,7 @@ function _print_pdf_tcpdf($print, $html, $filename) {
   // set document information
   $pdf->SetAuthor(strip_tags($print['submitted']));
   $pdf->SetCreator(variable_get('site_name', 'Drupal'));
-  $pdf->SetTitle($print['title']);
+  $pdf->SetTitle(html_entity_decode($print['title'], ENT_QUOTES, UTF-8));
   $keys = implode(' ', explode("\n", trim(strip_tags($print['taxonomy']))));
   $pdf->SetKeywords($keys);
   $pdf->setPDFVersion('1.6');
@@ -395,7 +395,7 @@ function theme_print_pdf_tcpdf_header(&$pdf, &$html, $font) {
   // set header margin
   $pdf->SetHeaderMargin(5);
   // set header data
-  $pdf->SetHeaderData($logo, 10 * $ratio, $tpl_title[1], strip_tags($tpl_site_name[1]));
+  $pdf->SetHeaderData($logo, 10 * $ratio, html_entity_decode($tpl_title[1], ENT_QUOTES, UTF-8), strip_tags($tpl_site_name[1]));
 
   return $pdf;
 }