I'm building a chrome extension. It injects a script
tag with the src
attribute set to my service. The script attempts to make a GET
request with JQuery client to my service which I'll refer to as ~URL_FOR_MY_SERVICE~
. An error occurs before the request is made to the server (i.e. not shown in chrome dev tools network panel). The error handler shows an error object with the attribute statusText
with the value Error: SecurityError: Not valid character in URL: ~URL_FOR_MY_SERVICE~
. However, if I copy ~URL_FOR_MY_SERVICE~
and paste it directly into the browser, it works, so the characters in the URL are in fact valid. This problem seems to only occur on https://www.linkedin.com/
.
What's happening and how do I fix it?