Skip to content

Commit

Permalink
Fix for Pdf::fullPaths() messing up UTF-8 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
cheesegrits committed Sep 28, 2017
1 parent 06279d1 commit d50dadf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/fabrik/fabrik/Helpers/Pdf.php
Expand Up @@ -76,6 +76,10 @@ public static function fullPaths(&$data)
{
$doc = new \DOMDocument();
$doc->strictErrorChecking = FALSE;

// prepend encoding, otherwise UTF-8 will get munged into special chars
$data = '<?xml version="1.0" encoding="UTF-8"?>' . $data;

$doc->loadHTML($data);
$ok = simplexml_import_dom($doc);

Expand Down

0 comments on commit d50dadf

Please sign in to comment.