sneakypete81 / updatescanner

Firefox addon to monitor web pages for updates.
http://sneakypete81.github.io/updatescanner/
GNU General Public License v3.0
204 stars 31 forks source link

css problems with sites that have <base> tag in head #91

Open gunnicom opened 7 years ago

gunnicom commented 7 years ago

Example site: https://www.bsi.bund.de/DE/Service/Aktuell/Cert_Bund_Meldungen/cert_bund_meldungen_node.html

Site gets not rendered correctly in update scanner. I think it may have to do with the base tag. The original site has a base tag like:

<base href="https://www.bsi.bund.de/">

Update scanner puts the site in an iframe and changes that to:

<base href="https://www.bsi.bund.de/DE/Service/Aktuell/Cert_Bund_Meldungen/cert_bund_meldungen_node.html" target="_parent">
<base href="https://www.bsi.bund.de/">

So now css wont get loaded because the path is wrong.

sneakypete81 commented 7 years ago

Good analysis, we should only add the base.href if one does not exist already.

gunnicom commented 7 years ago

I would fix this myself, but i am not able to build and test. Change should be made around here: https://github.com/sneakypete81/updatescanner/blob/4c5c948dab85fec6f01780c8436e0a4eee1ef6c4/content/diffPage.js#L196