-
-
Notifications
You must be signed in to change notification settings - Fork 165
Description
When clicking on an external link with search parameters inside an epub, say https://www.example.com?attr_a&attr_b=123, the search parameters are stripped and the browser opens the external page without them, which sometimes leads to a wrong page.
It seems to me that only epubs are affected by this: the View's method #handleLinks calls section.resolveHref, which is an epub only feature, that calls resolveURL (in epub.js), which removes the search parameters. Since this has been introduced with a specific commit (d44e8d6) I guess it's the intended behavior, but I'm not sure if it was intended for external links also.
My workaround is to listen to the event 'external-link' and to retrieve again the href from the a element (and then to call event.preventDefault() to avoid the double opening of the external page).
Is this the better approach or am I missing something?