1 [[template id=plugin name=htmlscrubber core=1 included=1
3 [[tag type/html type/core]]
5 This plugin is enabled by default. It sanitizes the html on pages it renders
6 to avoid XSS attacks and the like.
8 It excludes all html tags and attributes except for those that are
9 whitelisted using the same lists as used by Mark Pilgrim's Universal Feed
10 Parser, documented at <http://feedparser.org/docs/html-sanitization.html>.
11 Notably it strips `style`, `link`, and the `style` attribute.
13 It uses the [[cpan HTML::Scrubber]] perl module to perform its html
14 sanitisation, and this perl module also deals with various entity encoding
17 While I believe that this makes ikiwiki as resistant to malicious html
18 content as anything else on the web, I cannot guarantee that it will
19 actually protect every user of every browser from every browser security
20 hole, badly designed feature, etc. I can provide NO WARRANTY, like it says
21 in ikiwiki's [GPL](GPL) license.
23 The web's security model is *fundamentally broken*; ikiwiki's html
24 sanitisation is only a patch on the underlying gaping hole that is your web
29 Some examples of embedded javascript that won't be let through when this
32 * <span style="background: url(javascript:window.location='http://example.org/')">test</span>
33 * <span style="any: expression(window.location='http://example.org/')">test</span>
34 * <span style="any: expression(window.location='http://example.org/')">test</span>