Skip to content
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

Source URL is corrupted when there is a special character in it #206

Open
afeezaziz opened this issue Apr 1, 2017 · 4 comments
Open

Source URL is corrupted when there is a special character in it #206

afeezaziz opened this issue Apr 1, 2017 · 4 comments

Comments

@afeezaziz
Copy link

Hi,

Assuming that I have this image tag <lazy-img src="https://firebasestorage.googleapis.com/v0/b/playing-around-firebase123.appspot.com/o/bucket%2Fusers%252F3JPxuPMDxTmc5L37wc30IOVThkJ3%2Fimages%2Fpublic%2Fbox.png?alt=media&token=7533c31a-e82b-4eb8-bd12-3cce1273bc84"></lazy-img>. Every time, it will load this instead: <lazy-img src="https://firebasestorage.googleapis.com/v0/b/playing-around-firebase123.appspot.com/o/bucket%252Fusers%252F3JPxuPMDxTmc5L37wc30IOVThkJ3%252Fimages%252Fpublic%252Fbox.png?alt=media&token=7533c31a-e82b-4eb8-bd12-3cce1273bc84"></lazy-img> which means that if there is a %2f in the url, it will add 52 in between 2 and f which makes it %252f or a broken link. How can I fix this?

@demonVibe
Copy link

Hi @afeezaziz I stumbled upon the same issue as yours.
%2f is the url encoding of /, %252f seems a double encode of the specific string.
So, what you need to do is just skip the uri encoding in the plugin.
There's an option for this,
When you initialize the plugin in you app component you can add this line:
ImgCache.options.skipURIencoding = true;

Hope this helps you fix your issue

@wstrinz
Copy link

wstrinz commented Sep 12, 2017

@demonVibe 's fix worked for me. Thanks!

@khouleBousso
Copy link

khouleBousso commented Dec 12, 2017

Thanks @demonVibe you save my day

@darwiin
Copy link

darwiin commented Mar 13, 2018

Thanks @demonVibe , you save my day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants