Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

<style> visibly inserted into XML #464

Closed
kannes opened this issue Jan 7, 2015 · 9 comments
Closed

<style> visibly inserted into XML #464

kannes opened this issue Jan 7, 2015 · 9 comments

Comments

@kannes
Copy link

kannes commented Jan 7, 2015

This might be the same issue as gorhill/uMatrix#85 on umatrix.

Looking at http://sourceforge.net/sitemap.xml I noticed a block of style being inserted to the rendered page:

<style id="ublock-preload-1ae7a5f130fc79b4fdb8a4272d9426b5">
#fad, .ads, [href^="http://twitter.com/?status="], [href^="http://twitter.com/home/?"], [href^="http://twitter.com/home?"], [href^="http://twitter.com/intent/tweet?"], [href^="http://twitter.com/share?"], [href^="https://twitter.com/intent/follow?"], [href^="https://twitter.com/intent/retweet?tweet_id"], [href^="https://twitter.com/intent/tweet?"], [href^="https://twitter.com/share?"], #banner-ads, .social-sharing, .twitter-tweet-button, .twitter-share-button, .g-plusone, .ad.super, div[id^="mainads"], script[src^="http://free-shoutbox.net/app/webroot/shoutbox/sb.php?shoutbox="] + #freeshoutbox_content, p[id^="div-gpt-ad-"], input[onclick^="window.open('http://www.friendlyduck.com/AF_"], input[onclick^="window.open('http://www.FriendlyDuck.com/AF_"], img[alt^="Fuckbook"], iframe[src^="http://cdn2.adexprt.com/"], iframe[src^="http://cdn1.adexprt.com/"], iframe[src^="http://ad.yieldmanager.com/"], iframe[id^="google_ads_frame"], div[id^="div-gpt-ad-"], div[id^="acm-ad-tag-"], div[id^="YFBMSN"], div[id^="MarketGid"], a[onmousedown^="this.href='https://paid.outbrain.com/network/redir?"][target="_blank"] + .ob_source, a[onmousedown^="this.href='https://paid.outbrain.com/network/redir?"][target="_blank"], a[onmousedown^="this.href='http://staffpicks.outbrain.com/network/redir?"][target="_blank"] + .ob_source, a[onmousedown^="this.href='http://staffpicks.outbrain.com/network/redir?"][target="_blank"], a[onmousedown^="this.href='http://paid.outbrain.com/network/redir?"][target="_blank"] + .ob_source, a[onmousedown^="this.href='http://paid.outbrain.com/network/redir?"][target="_blank"], [href^="http://taboola-"][href*="/redirect.php?app.type="], [href^="http://paid.outbrain.com/network/redir?"][target="_blank"], [href^="http://games.ucoz.ru/"][target="_blank"], [href^="http://api.taboola.com/"][href*="/recommendations.notify-click?app.type="], [href^="http://amzn.to/"] > img[src^="data"], a[href*="/adrotate-out.php?"], a[href$="/vghd.shtml"], a[data-redirect^="this.href='http://paid.outbrain.com/network/redir?"], [onclick^="window.open('http://adultfriendfinder.com/search/"], [href^="//adbit.co/?a=Advertise&"], div[id^="digg-widget-"], [href="http://www.addthis.com/bookmark.php"], iframe[src^="http://www.facebook.com/plugins/recommendations.php?"], iframe[src^="http://www.facebook.com/plugins/likebox.php?"], iframe[src^="http://www.facebook.com/plugins/activity.php?"], div[id^="simple_tweet_widget"], div[id^="pw_widget_"], div[id^="gigya_share_button"], div[data-jsonurl^="/nfl-assets/data/twitter/"], a[name="sharethis"], [href^="//pinterest.com/pin/create/button/?"], a[href="http://www.simplesharebuttons.com"], a[href="http://www.facebook.com/sharer.php"], a[href="http://www.delicious.com/save"], a[href="http://www.addtoany.com/share_save"], a[href="http://twitter.com/share"], a[href="http://delicious.com/save"], a[href="http://del.icio.us/post"], a[data-tm-ref-type-id="Follow-on-YouTube"], a[data-tm-ref-type-id="Follow-on-Facebook"], [target="socialbookmark"], [name="fb_share"], [name="Click to follow us on twitter"], [id^="gigya_inline_share_"], [class^="social_button_"], [href^="http://www.freefilesdownloader.com/"], [href^="http://www.facebook.com/share.php?u="], [href^="http://www.facebook.com/sharer.php?"], [href^="http://www.facebook.com/sharer/sharer.php?"], [href^="https://www.facebook.com/sharer.php?"], [href^="https://www.facebook.com/sharer/sharer.php?u="], [href^="http://www.faceporn.net/free?"], [href^="https://plus.google.com/share?url="], [href^="http://www.linkedin.com/shareArticle?"], [title="Share on Facebook"], [title="Share on Twitter"], [title="Share on Google+"], .share.stumble, .icon-facebook, .icon-twitter, .icon-google, .feature > #tell-a-friend {display:none !important;}
</style>
<style class="ublock-preload-1ae7a5f130fc79b4fdb8a4272d9426b5">
iframe[src="http://tpc.googlesyndication.com/safeframe/1-0-1/html/container.html"], iframe[src="http://platform.twitter.com/widgets/hub.fe4e93d64f1afc988e99833088f71057.html"], iframe[src="http://sourceforge.net/static/ads/iframe_ad.html?position=LeadGen_Developer_page&ad=%2F%2Fad.doubleclick.net%2FN4140%2Fadj%2Fostg.sourceforge%2FLeadGen_Developer_page%3Bsz%3D384x70%3Blogged_in%3D0%3Btile%3D1%3Bu%3De%253Ae5ae2bb0-967c-11e4-9d15-0200ac1d2935%3Bord%3D8917770240994817%3F&class="], iframe[src="http://sourceforge.net/static/ads/iframe_ad.html?position=LeadGen_Developer_page&ad=%2F%2Fad.doubleclick.net%2FN4140%2Fadj%2Fostg.sourceforge%2FLeadGen_Developer_page%3Bsz%3D384x70%3Blogged_in%3D0%3Btile%3D1%3Bu%3De%253Af59512dc-967c-11e4-bf37-0200ac1d293a%3Bord%3D799891185098987%3F&class="], iframe[src="http://sourceforge.net/static/ads/iframe_ad.html?position=LeadGen_Developer_page&ad=%2F%2Fad.doubleclick.net%2FN4140%2Fadj%2Fostg.sourceforge%2FLeadGen_Developer_page%3Bsz%3D384x70%3Blogged_in%3D0%3Btile%3D1%3Bu%3De%253Af75b8f7e-967c-11e4-9ef2-0200ac1d293a%3Bord%3D1561565238490964%3F&class="], iframe[src="http://sourceforge.net/static/ads/iframe_ad.html?position=LeadGen_Developer_page&ad=%2F%2Fad.doubleclick.net%2FN4140%2Fadj%2Fostg.sourceforge%2FLeadGen_Developer_page%3Bsz%3D384x70%3Blogged_in%3D0%3Btile%3D1%3Bu%3De%253Afe70eaf2-967c-11e4-a429-0200ac1d293a%3Bord%3D9577274561276292%3F&class="], iframe[src="http://sourceforge.net/static/ads/iframe_ad.html?position=LeadGen_Developer_page&ad=%2F%2Fad.doubleclick.net%2FN4140%2Fadj%2Fostg.sourceforge%2FLeadGen_Developer_page%3Bsz%3D384x70%3Blogged_in%3D0%3Btile%3D1%3Bu%3De%253A0a397d7c-967d-11e4-bc10-0200ac1d2938%3Bord%3D2108593754478469%3F&class="], iframe[src="http://sourceforge.net/static/ads/iframe_ad.html?position=LeadGen_Developer_page&ad=%2F%2Fad.doubleclick.net%2FN4140%2Fadj%2Fostg.sourceforge%2FLeadGen_Developer_page%3Bsz%3D384x70%3Blogged_in%3D0%3Btile%3D1%3Bu%3De%253A0cd84efa-967d-11e4-a781-0200ac1d293c%3Bord%3D6783578107128746%3F&class="], iframe[src="http://sourceforge.net/static/ads/iframe_ad.html?position=LeadGen_Developer_page&ad=%2F%2Fad.doubleclick.net%2FN4140%2Fadj%2Fostg.sourceforge%2FLeadGen_Developer_page%3Bsz%3D384x70%3Blogged_in%3D0%3Btile%3D1%3Bu%3De%253A0f0ba74e-967d-11e4-8aa3-0200ac1d2933%3Bord%3D6985321486807391%3F&class="], iframe[src="http://sourceforge.net/static/ads/iframe_ad.html?position=LeadGen_Developer_page&ad=%2F%2Fad.doubleclick.net%2FN4140%2Fadj%2Fostg.sourceforge%2FLeadGen_Developer_page%3Bsz%3D384x70%3Blogged_in%3D0%3Btile%3D1%3Bu%3De%253A11154cca-967d-11e4-86b8-0200ac1d2939%3Bord%3D9341359971465688%3F&class="], iframe[src="http://sourceforge.net/static/ads/iframe_ad.html?position=LeadGen_Developer_page&ad=%2F%2Fad.doubleclick.net%2FN4140%2Fadj%2Fostg.sourceforge%2FLeadGen_Developer_page%3Bsz%3D384x70%3Blogged_in%3D0%3Btile%3D1%3Bu%3De%253A13261a76-967d-11e4-ade7-0200ac1d293c%3Bord%3D7085869231566764%3F&class="], iframe[src="http://sourceforge.net/static/ads/iframe_ad.html?position=LeadGen_Developer_page&ad=%2F%2Fad.doubleclick.net%2FN4140%2Fadj%2Fostg.sourceforge%2FLeadGen_Developer_page%3Bsz%3D384x70%3Blogged_in%3D0%3Btile%3D1%3Bu%3De%253A15a24338-967d-11e4-ad93-0200ac1d2940%3Bord%3D2746960783899731%3F&class="], iframe[src="http://sourceforge.net/static/ads/iframe_ad.html?position=LeadGen_Developer_page&ad=%2F%2Fad.doubleclick.net%2FN4140%2Fadj%2Fostg.sourceforge%2FLeadGen_Developer_page%3Bsz%3D384x70%3Blogged_in%3D0%3Btile%3D1%3Bu%3De%253A1c8da0c0-967d-11e4-a37f-0200ac1d2941%3Bord%3D2776755475443243%3F&class="], iframe[src="http://sourceforge.net/static/ads/iframe_ad.html?position=LeadGen_Developer_page&ad=%2F%2Fad.doubleclick.net%2FN4140%2Fadj%2Fostg.sourceforge%2FLeadGen_Developer_page%3Bsz%3D384x70%3Blogged_in%3D0%3Btile%3D1%3Bu%3De%253A1e0eb07e-967d-11e4-ad6b-0200ac1d2939%3Bord%3D273870635175343%3F&class="], iframe[src="http://sourceforge.net/static/ads/iframe_ad.html?position=LeadGen_Developer_page&ad=%2F%2Fad.doubleclick.net%2FN4140%2Fadj%2Fostg.sourceforge%2FLeadGen_Developer_page%3Bsz%3D384x70%3Blogged_in%3D0%3Btile%3D1%3Bu%3De%253A20d36250-967d-11e4-8622-0200ac1d2939%3Bord%3D973755232766707%3F&class="], iframe[src="http://sourceforge.net/static/ads/iframe_ad.html?position=LeadGen_Developer_page&ad=%2F%2Fad.doubleclick.net%2FN4140%2Fadj%2Fostg.sourceforge%2FLeadGen_Developer_page%3Bsz%3D384x70%3Blogged_in%3D0%3Btile%3D1%3Bu%3De%253A22d470da-967d-11e4-bc90-0200ac1d2934%3Bord%3D2252720283681098%3F&class="], iframe[src="http://sourceforge.net/static/ads/iframe_ad.html?position=LeadGen_Developer_page&ad=%2F%2Fad.doubleclick.net%2FN4140%2Fadj%2Fostg.sourceforge%2FLeadGen_Developer_page%3Bsz%3D384x70%3Blogged_in%3D0%3Btile%3D1%3Bu%3De%253A25854430-967d-11e4-b0dc-0200ac1d293f%3Bord%3D8018831043353205%3F&class="], iframe[src="http://sourceforge.net/static/ads/iframe_ad.html?position=LeadGen_Developer_page&ad=%2F%2Fad.doubleclick.net%2FN4140%2Fadj%2Fostg.sourceforge%2FLeadGen_Developer_page%3Bsz%3D384x70%3Blogged_in%3D0%3Btile%3D1%3Bu%3De%253A294af2c2-967d-11e4-ab72-0200ac1d2934%3Bord%3D8432974624832174%3F&class="], iframe[src="http://sourceforge.net/static/ads/iframe_ad.html?position=LeadGen_Developer_page&ad=%2F%2Fad.doubleclick.net%2FN4140%2Fadj%2Fostg.sourceforge%2FLeadGen_Developer_page%3Bsz%3D384x70%3Blogged_in%3D0%3Btile%3D1%3Bu%3De%253A2aae3ba6-967d-11e4-8bb6-0200ac1d2933%3Bord%3D4627426793271421%3F&class="], iframe[src="http://sourceforge.net/static/ads/iframe_ad.html?position=LeadGen_Developer_page&ad=%2F%2Fad.doubleclick.net%2FN4140%2Fadj%2Fostg.sourceforge%2FLeadGen_Developer_page%3Bsz%3D384x70%3Blogged_in%3D0%3Btile%3D1%3Bu%3De%253A2d4342d0-967d-11e4-85ea-0200ac1d2934%3Bord%3D6485599689710463%3F&class="] {display:none !important;}
</style>
@gorhill
Copy link
Contributor

gorhill commented Jan 7, 2015

"Visibly"? I cannot see this.

a

@kannes
Copy link
Author

kannes commented Jan 7, 2015

I have not figured out when it appears and when not. Try loading one of the URLs in that screenshot, eg sourceforge.net/sitemap-0.xml

http://i.imgur.com/nnILOMY.png

Maybe it only appears if some referring is happening or something.

I am with Opera 26.0.1656.60

@gorhill
Copy link
Contributor

gorhill commented Jan 7, 2015

Ok. I guess the tag may end up being injected outside the document head sometimes. The only thing I found out on how to solve this is to look at the value of document.contentType -- a non-standard property.

@Kelnozz
Copy link

Kelnozz commented Jan 13, 2015

Same issue here.

@Deathamns
Copy link
Contributor

@gorhill

The only thing I found out on how to solve this is to look at the value of document.contentType -- a non-standard property.

if ( !(document instanceof HTMLDocument) ) {
   return;
}

@gorhill
Copy link
Contributor

gorhill commented Jan 13, 2015

That works, thanks for the tip.

@kannes
Copy link
Author

kannes commented Jan 23, 2015

Ran into another one with uMatrix, it does not seem to happen with uBlock for me: http://line-mode.cern.ch/www/hypertext/WWW/TheProject.html

This seems to be a tracking issue so I rather post it here.

Screenshot: http://i.imgur.com/Yy6aF0y.png

µMatrix 0.8.1.3 in Chromium Version 39.0.2171.99 (64-bit).

@kannes
Copy link
Author

kannes commented Jan 23, 2015

Oh, actually uBlock (in Opera) inserts something too (only sometimes, I am confused...):

#content > #right > .dose > .dosesingle, #content > #center > .dose > .dosesingle {display:none !important;}img[src="https://piwik.web.cern.ch/piwik.php?idsite=192&rec=1"] {display:none !important;}
The World Wide Web project
WORLD WIDE WEB

The WorldWideWeb (W3) is a wide-area hypermedia[1] information retrieval initiative aiming to give universal access to a large universe of documents.
Everything there is online about W3 is linked directly or indirectly to this document, including an executive summary[2] of the project, Mailing lists[3] , Policy[4] , November's W3 news[5] , Frequently Asked Questions[6] .
What's out there?[7] Pointers to the world's online information, subjects[8] , W3 servers[9], etc. Help[10] on the browser you are using Software Products[11] A list of W3 project components and their current state. (e.g. Line Mode[12] ,X11 Viola[13] , NeXTStep[14] , Servers[15] , Tools[16] , Mail robot[17] , Library[18] ) Technical[19] Details of protocols, formats, program internals etc Bibliography[20] Paper documentation on W3 and references. People[21] A list of some people involved in the project. History[22] A summary of the history of the project. How can I help[23] ? If you would like to support the web.. Getting code[24] Getting the code by anonymous FTP[25] , etc.

     [End]
<ref.number>, <RETURN> for more, Quit, or Help:  

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants