diff --git a/src/core/io.coffee b/src/core/io.coffee index 512672ab..8b35d030 100644 --- a/src/core/io.coffee +++ b/src/core/io.coffee @@ -1,7 +1,7 @@ # Various I/O based operations class Caman.IO # Used for parsing image URLs for domain names. - @domainRegex: /(?:(?:http|https):\/\/)((?:\w+)\.(?:(?:\w|\.)+))/ + @domainRegex: /(?:(?:http|https):\/\/)((?:[a-zA-Z0-9_-]+)\.(?:(?:[a-zA-Z0-9_-]*|\.)+))/; # Is the given URL remote? # If a cross-origin setting is set, we assume you have CORS @@ -110,4 +110,4 @@ Caman::toBase64 = (type = "png") -> type = type.toLowerCase() return @canvas.toDataURL "image/#{type}" -IO = Caman.IO \ No newline at end of file +IO = Caman.IO