Opened on 09/25/2014 at 07:46:16 AM
Closed on 09/26/2014 at 05:46:46 PM
#1441 closed change (fixed)
Let the browser resolve URLs instead doing it ourselve
Reported by: | sebastian | Assignee: | sebastian |
---|---|---|---|
Priority: | P4 | Milestone: | Adblock-Plus-1.8.6-for-Chrome-Opera-Safari |
Module: | Platform | Keywords: | |
Cc: | greiner | Blocked By: | |
Blocking: | Platform: | Unknown | |
Ready: | yes | Confidential: | no |
Tester: | Verified working: | no | |
Review URL(s): |
Description
Background
The functions relativeToAbsoluteUrl()and normalizeURL(), as used by the "Block Element" dialog and the request blocking code for Safari, aim to mimic the way the browser resolves URLs. This approach has following problems:
- The way it is currently implemented is incorrect (e.g. subsequent slashes are stripped, which Chrome doesn't do).
- The behavior is inconsistent with cases where the browser resolves the URL itself (e.g. when we retrieve an element's src attribute).
- This code adds a fair amount of complexity and is potentially slower than letting the browser resolve the URL by itself.
What to change
Get rid of relativeToAbsoluteUrl()and normalizeURL(). And use a temporary <a> element to resolve URLs via its href attribute instead.
Attachments (0)
Change History (3)
comment:1 Changed on 09/25/2014 at 07:47:19 AM by sebastian
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:2 Changed on 09/25/2014 at 09:54:09 AM by greiner
- Cc greiner added
comment:3 Changed on 09/26/2014 at 05:46:46 PM by sebastian
- Milestone set to Adblock-Plus-for-Chrome-Opera-Safari-next
- Resolution set to fixed
- Status changed from reviewing to closed
Note: See
TracTickets for help on using
tickets.
https://hg.adblockplus.org/adblockpluschrome/rev/12a414257419