Skip to content

Commit 874f1be

Browse files
authored
Merge pull request #355 from vanillajonathan/patch-1
Change http to https
2 parents 36dbce7 + c57350f commit 874f1be

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
HtmlSanitizer
22
=============
33

4-
[![NuGet version](https://badge.fury.io/nu/HtmlSanitizer.svg)](http://badge.fury.io/nu/HtmlSanitizer)
4+
[![NuGet version](https://badge.fury.io/nu/HtmlSanitizer.svg)](https://badge.fury.io/nu/HtmlSanitizer)
55
[![Build status](https://ci.appveyor.com/api/projects/status/418bmfx643iae00c/branch/master?svg=true)](https://ci.appveyor.com/project/mganss/htmlsanitizer/branch/master)
66
[![codecov.io](https://codecov.io/github/mganss/HtmlSanitizer/coverage.svg?branch=master)](https://codecov.io/github/mganss/HtmlSanitizer?branch=master)
77
[![Sonarcloud Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=mganss_HtmlSanitizer&metric=alert_status)](https://sonarcloud.io/dashboard?id=mganss_HtmlSanitizer)
@@ -34,14 +34,14 @@ Install the [HtmlSanitizer NuGet package](https://www.nuget.org/packages/HtmlSan
3434
```C#
3535
var sanitizer = new HtmlSanitizer();
3636
var html = @"<script>alert('xss')</script><div onload=""alert('xss')"""
37-
+ @"style=""background-color: test"">Test<img src=""test.gif"""
37+
+ @"style=""background-color: test"">Test<img src=""test.png"""
3838
+ @"style=""background-image: url(javascript:alert('xss')); margin: 10px""></div>";
39-
var sanitized = sanitizer.Sanitize(html, "http://www.example.com");
39+
var sanitized = sanitizer.Sanitize(html, "https://www.example.com");
4040
Assert.That(sanitized, Is.EqualTo(@"<div style=""background-color: test"">"
41-
+ @"Test<img style=""margin: 10px"" src=""http://www.example.com/test.gif""></div>"));
41+
+ @"Test<img style=""margin: 10px"" src=""https://www.example.com/test.png""></div>"));
4242
```
4343

44-
There's an [online demo](http://xss.ganss.org/), plus there's also a [.NET Fiddle](https://dotnetfiddle.net/892nOk) you can play with.
44+
There's an [online demo](https://xss.ganss.org/), plus there's also a [.NET Fiddle](https://dotnetfiddle.net/892nOk) you can play with.
4545

4646
More example code and a description of possible options can be found in the [Wiki](https://github.com/mganss/HtmlSanitizer/wiki).
4747

@@ -73,7 +73,7 @@ _Note:_ the `style` tag is disallowed by default.
7373
### URI schemes allowed by default
7474
``http, https``
7575

76-
_Note:_ [Protocol-relative URLs](http://en.wikipedia.org/wiki/Wikipedia:Protocol-relative_URL) (e.g. <a href="//github.com">//github.com</a>) are allowed by default (as are other relative URLs).
76+
_Note:_ [Protocol-relative URLs](https://en.wikipedia.org/wiki/Wikipedia:Protocol-relative_URL) (e.g. <a href="//github.com">//github.com</a>) are allowed by default (as are other relative URLs).
7777

7878
to allow `mailto:` links:
7979

@@ -105,4 +105,4 @@ On the other hand, although some broken HTML is fixed by the parser, the output
105105
License
106106
-------
107107

108-
[MIT X11](http://en.wikipedia.org/wiki/MIT_License)
108+
[MIT X11](https://en.wikipedia.org/wiki/MIT_License)

0 commit comments

Comments
 (0)