We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
provided html contains the following tag
<img title="name.jpeg" src="data:null;base64, /9j/....
processing crashed:
2024-07-22 15:24:47 ::ffff:192.168.65.1 - - [2024-07-22 13:24:47] "POST /convert/html?presentational_hints=true&pdf_variant=pdf%2Fa-2b HTTP/1.1" 200 2977 0.021722 2024-07-22 15:28:16 ERROR:root:'utf-8' codec can't decode byte 0xff in position 0: invalid start byte 2024-07-22 15:28:16 Traceback (most recent call last): 2024-07-22 15:28:16 File "/opt/weasyprint/app/WeasyprintController.py", line 35, in convert_html 2024-07-22 15:28:16 html = SvgUtils.process_svg(html) 2024-07-22 15:28:16 ^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-07-22 15:28:16 File "/opt/weasyprint/app/SvgUtils.py", line 15, in process_svg 2024-07-22 15:28:16 return re.sub(pattern, replace_img_base64, html) 2024-07-22 15:28:16 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-07-22 15:28:16 File "/usr/local/lib/python3.12/re/__init__.py", line 186, in sub 2024-07-22 15:28:16 return _compile(pattern, flags).sub(repl, string, count) 2024-07-22 15:28:16 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-07-22 15:28:16 File "/opt/weasyprint/app/SvgUtils.py", line 26, in replace_img_base64 2024-07-22 15:28:16 replaced_content_base64 = replace_svg_with_png(content_base64) 2024-07-22 15:28:16 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-07-22 15:28:16 File "/opt/weasyprint/app/SvgUtils.py", line 36, in replace_svg_with_png 2024-07-22 15:28:16 svg_content = base64.b64decode(possible_svg_base64_content).decode('utf-8') 2024-07-22 15:28:16 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-07-22 15:28:16 UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte 2024-07-22 15:28:16 ::ffff:192.168.65.1 - - [2024-07-22 13:28:16] "POST /convert/html?presentational_hints=true&pdf_variant=pdf%2Fa-2b HTTP/1.1" 400 215 0.008822
image will not be replaced
see current behavior section
No response
The text was updated successfully, but these errors were encountered:
fix: check for SVG is changed
72c0230
binary content can not be SVG Refs: #35
fix: check for SVG is changed (#36)
4951a52
grigoriev
Successfully merging a pull request may close this issue.
Current Behavior
provided html contains the following tag
processing crashed:
Expected Behavior
image will not be replaced
Steps To Reproduce
see current behavior section
Anything else
No response
The text was updated successfully, but these errors were encountered: