terrymun/Fluidbox

Image URLs containing a plus sign cause an "opening halted" warning

Opened this issue · 0 comments

The following URL fails to open with Fluidbox: http://placehold.it/1024x768&text=Your+text, and this is logged to the console:

Fluidbox: Fluidbox opening is halted because it has detected characters in your URL string that need to be properly encoded/escaped. Whitespace(s) have to be escaped manually. See RFC3986 documentation.

I believe this is caused by /[\s+]/g being used instead of /\s+/g here:

if(/[\s+]/g.test(url)) {