CamanJS icon indicating copy to clipboard operation
CamanJS copied to clipboard

Url pattern problem with hyphened domain names

Open n00dl3 opened this issue 11 years ago • 2 comments

Hi, we got a problem on a site with a domain name containing an hyphen, images were considered as other domain ones, line 1403 of caman.full.js v4.1.2 IO.domainRegex = /(?:(?:http|https):\/\/)((?:\w+)\.(?:(?:\w|\.)+))/; we had to replace it by IO.domainRegex = /(?:(?:http|https):\/\/)((?:[a-zA-Z0-9_-]+)\.(?:(?:[a-zA-Z0-9_-]*|\.)+))/; which does the trick

edit: Sorry, I put a wrong one as a fix

n00dl3 avatar Oct 20 '14 09:10 n00dl3

@n00dl3 could you submit this as a pull request, so when @meltingice finally decides to actually deal with bug reports, it's a small task for them to fix this issue?

MarkTraceur avatar Mar 24 '16 19:03 MarkTraceur

Related pull requests:

  • #199
  • #151
  • #152
  • 1ac3fb607da642597b02e6e0e4f875e111b27324 in #163

prtksxna avatar Apr 19 '16 07:04 prtksxna