mikeboers / Flask-Images

On-demand resizing of images for Flask applications.
https://mikeboers.github.io/Flask-Images/
BSD 3-Clause "New" or "Revised" License
81 stars 43 forks source link

The generated link contains quotes #51

Closed ovionlogis closed 4 years ago

ovionlogis commented 6 years ago

Faced the problem that the link to the image contains quotes:

/imgsizer/image.jpg?v=WzdUWw&w=480&s=b'PKgfqQAtQuvQseN6-gErB3tRjtM'

The whole problem in the s parameter, looks like the bytes are converted incorrectly into a string.

Python 3.7 Flask-Images 3.0.1 Linux Mint 19

mikeboers commented 6 years ago

Amazing. Those are some quality tests I've written here. 🙄

ovionlogis commented 6 years ago

@mikeboers I do not understand what you mean, can you explain?

jllopezpino commented 4 years ago

Same problem here... Did you find any workaround @ovionlogis ?

We tried to use replace("'", '%27'), but errors keep coming. Example:

<img src="{{ url_for('images', format=session.get('image_format'), filename='image.png', width=550, quality=75).replace("'", '%27') }}"

ovionlogis commented 4 years ago

@jllopezpino fork and decode utf-8

https://github.com/mikeboers/Flask-Images/compare/master...ovionlogis:master

mikeboers commented 4 years ago

I just pulled @ovionlogis changes. Thanks!