question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Image URL containing parentheses or space is not working

See original GitHub issue

Providing a URL that contains parenthesis (left or right) to NgxGalleryImage array, making the image to be blank.

for example:

this.galleryImages.push({
        small: URL/IMAGE_NAME_CONTAINS_PARANTHESIS(small).jpg,
        medium: URL/IMAGE_NAME_CONTAINS_PARANTHESIS(medium).jpeg,
        big:URL/IMAGE_NAME_CONTAINS_PARANTHESIS(big).jpeg
});

when using the above block of code, the gallery will show a blank image.

Edit - Nov. 21, 2017 - 3:25 PM GMT :

Also if the image name contains a space it is not being handled by the library, so, I have to encodeURI(the-image-url-with-name-contains-space) explicitly.

Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lukasz-galkacommented, Nov 22, 2017

@omar-nassar , @ChRonX13 please check version 3.1.4. I have removed encodeURI and now I’m just replacing spaces with %20

1reaction
german-e-mascommented, Nov 21, 2017

Interesting, I saw this problem too, but didn’t thought it was this component. Nice catch @omar-nassar

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using image URL with parentheses as background with jQuery
I know the problem is that the file name contain parentheses () , but I've tried all sorts of things and nothing works....
Read more >
Style attributes dropped with parentheses in image url - Learn
I was using a style attribute on an element to set the background-image . · The image in question had 'parentheses' in the...
Read more >
Links to URLs containing parentheses - Meta Stack Exchange
Sometimes URLs can fail to link correctly because they contain disallowed characters. In these cases encode the characters using the % notation.
Read more >
Images with Spaces · Issue #167 · xoofx/markdig - GitHub
When embedding image urls with spaces the images are not parsed and the raw markdown is embedded: This doesn't work (doesn't parse just ......
Read more >
Markdown: inline links don't hande spaces and brackets ...
0. Link issues together to show that they're related or that one is blocking ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found