Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/core/io.coffee
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -110,4 +110,4 @@ Caman::toBase64 = (type = "png") ->
type = type.toLowerCase()
return @canvas.toDataURL "image/#{type}"

IO = Caman.IO
IO = Caman.IO