Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upFixed #221 - Image src URLs with spaces in them don't work for fittedImage and croppedImage #222
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
srikumarks
Apr 21, 2015
The best way to deal with such string safety is via the type system. A URL type should be used instead of String for these image source arguments.
srikumarks
commented
Apr 21, 2015
|
The best way to deal with such string safety is via the type system. A |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
srikumarks
commented
Apr 23, 2015
|
The Travis failure, btw, is a failure to install elm-compiler-0.15. |
srikumarks
added some commits
Apr 26, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Jun 30, 2015
Member
Can you show an example of a "good string" that can be given to these functions that causes an unexpected result?
|
Can you show an example of a "good string" that can be given to these functions that causes an unexpected result? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
srikumarks
Jul 2, 2015
I'd noted a few in my issue comment here. For example, passing "hello).png" would generate "url(hello).png)" for the "background" property which fails to parse.
srikumarks
commented
Jul 2, 2015
|
I'd noted a few in my issue comment here. For example, passing "hello).png" would generate "url(hello).png)" for the "background" property which fails to parse. |
jvoigtlaender
referenced this pull request
Jan 19, 2016
Closed
Image src URLs with spaces in them don't work for fittedImage and croppedImage #221
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
May 10, 2016
Member
I don't really understand what is going on here or what would be good, but the Graphics.* modules have moved to evancz/elm-graphics so it makes sense to retarget stuff like this.
|
I don't really understand what is going on here or what would be good, but the |
evancz
closed this
May 10, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
May 10, 2016
Member
Oh, I get it from the last comment. The change in the one file makes sense, but the other one is weird.
|
Oh, I get it from the last comment. The change in the one file makes sense, but the other one is weird. |
srikumarks commentedApr 21, 2015
The problem was that the native implementations of
fittedImageandcroppedImageused CSSbackground-image, but were not encoding theURLs before generating the property. This commit encodes the
srcparameter using
encodeURIComponent, which makes them work correctly.