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 605d0a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
20 changes: 0 additions & 20 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
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 605d0a1

Please sign in to comment.