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.

Using data-src fails on urls containing commas

See original GitHub issue

If you have a srcset looking something like this:

https://some.domain.co/animage.jpg?rect=0,4,1936,1084&w=500&h=280&q=80&fit=crop&auto=format 500w, 
https://some.domain.co/animage.jpg?rect=0,3,1936,1086&w=1000&h=561&q=80&fit=crop&auto=format 1000w, 
https://some.domain.co/animage.jpg?rect=0,3,1936,1087&w=2000&h=1123&q=80&fit=crop&auto=format 2000w

loading will fail because it return a src image like this

1087&w=2000&h=1123&q=80&fit=crop&auto=format

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

3reactions
jorngeorgcommented, Jul 6, 2019

After some digging, I found the culprit to be this line https://github.com/hilongjw/vue-lazyload/blob/master/src/util.js#L74

options = options.trim().split(',')

The split expression here needs to be bit more clever, taking into account that an url can contain a comma.

0reactions
vin-nicommented, Nov 29, 2021

+1 I also had issues with sanity urls. They have commas when they are cropped

Read more comments on GitHub >

github_iconTop Results From Across the Web

DataSource.Error: OData: Invalid JSON. A comma character ...
This error message indicates that the data retrieved using the JSON transport format is actually not in valid JSON format.
Read more >
comma in csv data in ssis package - Stack Overflow
i am passing data from database to csv file i.e oledbsource to flat file destination. in few of the columns data, it contains...
Read more >
how to extract a flat file which is having commas in a field into ...
Go To RSA1-> Data Source -> Extraction -> Adapter -> Load Microsoft Excel File (XLS) from Local work Station -> File Name ->...
Read more >
Unable to Use Special Characters in URL Parameters
In Tableau Desktop, use a calculated field to replace the special characters, such as commas or spaces, with hyphens (-).
Read more >
Mail merge error when a data source is accessed by multiple ...
xlsx file as the data source. For example, open your data source in Excel, and then save it as an Excel 97-2003 Workbook...
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