{"action":"closed","issue":{"url":"https://api.github.com/repos/esigate/esigate/issues/87","labels_url":"https://api.github.com/repos/esigate/esigate/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/esigate/esigate/issues/87/comments","events_url":"https://api.github.com/repos/esigate/esigate/issues/87/events","html_url":"https://github.com/esigate/esigate/issues/87","id":53608074,"number":87,"title":"UrlRewriter incorrectly rewrites some Urls in scripts","user":{"login":"fxbonnet","id":491802,"avatar_url":"https://avatars.githubusercontent.com/u/491802?v=3","gravatar_id":"","url":"https://api.github.com/users/fxbonnet","html_url":"https://github.com/fxbonnet","followers_url":"https://api.github.com/users/fxbonnet/followers","following_url":"https://api.github.com/users/fxbonnet/following{/other_user}","gists_url":"https://api.github.com/users/fxbonnet/gists{/gist_id}","starred_url":"https://api.github.com/users/fxbonnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fxbonnet/subscriptions","organizations_url":"https://api.github.com/users/fxbonnet/orgs","repos_url":"https://api.github.com/users/fxbonnet/repos","events_url":"https://api.github.com/users/fxbonnet/events{/privacy}","received_events_url":"https://api.github.com/users/fxbonnet/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/esigate/esigate/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-07T08:17:12Z","updated_at":"2015-03-24T08:24:46Z","closed_at":"2015-03-24T08:24:46Z","body":"The regular expression used in UrlRewriter matches with some javascript code and rewrites it incorrectly. Ex:\r\n```html\r\n<script>\r\nlink='<embed src=\"'+this.getAttribute(\"src\")+'\"> ';\r\n</script>\r\n```\r\nor\r\n```html\r\n<script>\r\nlink='<a href=\"'+d+'\">'+e+\"</a>\";\r\n</script>\r\n```\r\nI think that for scripts we should just  use a regular expressions that replaces the base url in case the script uses absolute urls.\r\n"}}