Skip to content

Commit

Permalink
Merge pull request #226 from xelan/bugfix/hex-decoding
Browse files Browse the repository at this point in the history
Fix decoding of hexadecimal digits
  • Loading branch information
smalot authored Jan 23, 2019
2 parents 5de5e12 + be1c7ea commit ec72a99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Smalot/PdfParser/Font.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public static function decodeHexadecimal($hexa, $add_braces = false)
}

$text = '';
$parts = preg_split('/(<[a-z0-9]+>)/si', $hexa, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
$parts = preg_split('/(<[a-f0-9]+>)/si', $hexa, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);

foreach ($parts as $part) {
if (preg_match('/^<.*>$/', $part) && stripos($part, '<?xml') === false) {
Expand Down

0 comments on commit ec72a99

Please sign in to comment.