Skip to content

Commit

Permalink
More informative console warnings for invalid image URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymun committed Mar 15, 2016
1 parent 2245fca commit 100a649
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/jquery.paver.js
Original file line number Diff line number Diff line change
Expand Up @@ -724,10 +724,10 @@
var exitCode = 0;

if(/[\s+]/g.test(url)) {
console.warn('Paver: Paver has detected characters in your URL string that need to be properly encoded/escaped. Whitespace(s) have to be escaped manually. See RFC3986 documentation.');
console.warn('Paver: Paver has detected characters in your URL string ('+url+') that need to be properly encoded/escaped. Whitespace(s) have to be escaped manually. See RFC3986 documentation.');
exitCode = 1;
} else if(/[\"\'\(\)]/g.test(url)) {
console.warn('Paver: Plugin will proceed, but it has detected characters in your URL string that need to be properly encoded/escaped. These will be escaped for you. See RFC3986 documentation.');
console.warn('Paver: Plugin will proceed, but it has detected characters in your URL string ('+url+') that need to be properly encoded/escaped. These will be escaped for you. See RFC3986 documentation.');
exitCode = 0;
}
return exitCode;
Expand Down

0 comments on commit 100a649

Please sign in to comment.