-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
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
.discover fails on whitespace #7
Comments
hi, thanks for your contribution. according to rfc 2397 the syntax is:
...which means that whitespace is not allowed. the data: uri page on wikipedia contains:
though it continues like this:
i am not sure what the best behaviour would be here. (note: the behaviour of another library is not leading. that other library also seems to reparse on every attribute access, which this library will never do.) |
It seems to me like it should be safe to strip leading/trailing whitespace if the data is base64-encoded. I would be in support of doing that for convenience's sake. Other data types may care about whitespace. |
from #8 and #8 (comment)
|
Other project https://github.com/fcurella/python-datauri/ like has no problems (
pip3 install python-datauri
)FAIL
<img src="data:image/jpeg;base64, iVBORw0KGgoAAAANSUhEUgAgglpyJYUQnIAABCJJggg==">
PASS
<img src="data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAgglpyJYUQnIAABCJJggg==">
The text was updated successfully, but these errors were encountered: