Skip to content

Commit

Permalink
fix: base64 images not rendered inside of html
Browse files Browse the repository at this point in the history
I'm not sure when this happened, but default base64 encoded images were no longer rendered in html  text.

If the image is rendered like this:
```
<img src="data:image/png;base64,....." />
```

the image was not rendered when inside of an html text. Instead one has to replace `data:image/png;base64,` with `@`which in my opinion is not ideal and an overhead.

#179

Update include/tcpdf_static.php

Co-authored-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
compojoom and williamdes committed Apr 22, 2024
1 parent 13e8481 commit a31832a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
22 changes: 1 addition & 21 deletions CHANGELOG.TXT
Expand Up @@ -26,26 +26,6 @@
- Fix return type annotations (#613)
- Fix some inconsistencies in type hints (#598)

6.6.5 (2023-09-06)
- Fix corrupted file.

6.6.4 (2023-09-06)
- Fix GitHub automation tests.

6.6.3 (2023-09-06)
- Fix SPDX license ID (#591)
- Fix warning "array offset on value of type null" (#620)
- Improve the README about the status of this library (#589)
- Fix deprecation warning with PHP 8.1 (#614)
- Fixes for PHP 8.2 in tcpdf_fonts.php (#632)
- Fix some php 8+ edge cases (#630)
- Fix composite glyph output (#581)
- Fix "access array offset on value of type bool" with PDF/A (#583)
- Fix non-numeric value warning (#627)
- Fix issues with S25 barcode (#611)
- Fix return type annotations (#613)
- Fix some inconsistencies in type hints (#598)

6.6.2 (2022-12-17)
- Ensure pregSplit return type is always array.
- Add ability to run tests on various operating systems (#566)
Expand Down Expand Up @@ -309,7 +289,7 @@
- Starting from this version TCPDF is also available in GitHub at https://github.com/tecnickcom/TCPDF
- Function getmypid() was removed for better compatibility with shared hosting environments.
- Support for pulling SVG stroke opacity value from RGBa color was mergeg [adf006].
- Bug item #951 "HTML Table within TCPDF columns doesnt flow correctly on page break ..." was fixed.
- Bug item #951 "HTML Table within TCPDF columns doesnt flow correctly on page break ..." was fixed.

6.0.089 (2014-07-16)
- Bug item #948 "bottom line of rowspan cell not work correctly" was fixed.
Expand Down
3 changes: 3 additions & 0 deletions include/tcpdf_static.php
Expand Up @@ -1876,6 +1876,9 @@ public static function file_exists($filename) {
if (preg_match('|^https?://|', $filename) == 1) {
return self::url_exists($filename);
}
if (stripos($filename, 'data:') === 0) {
return true;
}
if (strpos($filename, '://')) {
return false; // only support http and https wrappers for security reasons
}
Expand Down

0 comments on commit a31832a

Please sign in to comment.