1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-12 16:58:37 +00:00

updated mpdf to 5.7.2

This commit is contained in:
tcit 2014-07-24 22:01:35 +02:00
parent fb9df0c269
commit d07abb5c42
6 changed files with 462 additions and 245 deletions

View file

@ -221,9 +221,8 @@ function ReadCSS($html) {
}
}
// mPDF 5.5.13
// Replace any background: url(data:image... with temporary image file reference
preg_match_all("/(url\(data:image\/(jpeg|gif|png);base64,(.*)\))/si", $CSSstr, $idata);
preg_match_all("/(url\(data:image\/(jpeg|gif|png);base64,(.*?)\))/si", $CSSstr, $idata); // mPDF 5.7.2
if (count($idata[0])) {
for($i=0;$i<count($idata[0]);$i++) {
$file = _MPDF_TEMP_PATH.'_tempCSSidata'.RAND(1,10000).'_'.$i.'.'.$idata[2][$i];
@ -699,6 +698,13 @@ function fixCSS($prop) {
}
else { $newprop[$k] = $v; }
}
else if ($k == 'LIST-STYLE') { // mPDF 5.7.2
if (preg_match('/(lower-roman|upper-roman|lower-latin|lower-alpha|upper-latin|upper-alpha|none|decimal|disc|circle|square|arabic-indic|bengali|devanagari|gujarati|gurmukhi|kannada|malayalam|oriya|persian|tamil|telugu|thai|urdu|cambodian|khmer|lao)/i',$v,$m)
|| preg_match('/U\+([a-fA-F0-9]+)/i',$v,$m)) {
$newprop['LIST-STYLE-TYPE'] = strtolower(trim($m[1]));
}
}
else {
$newprop[$k] = $v;