karl-rousseau / HybridTvViewer

[WIP] Web extension making Firefox & Chrome emulate iTV webpages instead of downloading them.
MIT License
67 stars 25 forks source link

Plugin is bypassed when ".jpg" appears in query parameters #24

Closed asciiman closed 3 years ago

asciiman commented 3 years ago

With our hbbtv app, we include urlencoded paths to images in the query parameters.

http://example.com?startImageURL=http%3A%2F%2Fhbbtv-video.example.de%2FSpot-Exchange%2FStartTile.jpg

When we include this query parameter, the plugin is not loading, but the app is downloaded as a file instead.

I saw in the plugin code in patcher.js that if the url includes many known media extensions, the plugin is bypassed. Was this intended to be for query parameters also? Or just for the pathname part of the url?

asciiman commented 3 years ago

In case you only meant to check the pathname and not the query parameters, I made a patch:

https://github.com/karl-rousseau/HybridTvViewer/pull/25

karl-rousseau commented 3 years ago

I do agree with you and I hadn't in mind this kind of URL. Thank you for your PR and I am merging it right now.