Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Replace - with _ in callback generation
Browse files Browse the repository at this point in the history
Having a "-" character in your URL causes a callback to be generated with an invalid function name.  Observed in GoogleWebComponents/google-apis@924dd1b.
  • Loading branch information
bamnet committed May 28, 2014
1 parent 64686a3 commit 601671c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core-shared-lib.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
}

function nameFromUrl(url) {
return url.replace(/[\:\/\%\?\&\.\=]/g, '_') + '_api';
return url.replace(/[\:\/\%\?\&\.\=\-]/g, '_') + '_api';
}

var Loader = function(name, url, callbackName) {
Expand Down

0 comments on commit 601671c

Please sign in to comment.