forked from External/grumble
Update for Go 1.
This commit is contained in:
parent
4114a83d64
commit
e46a65109f
31 changed files with 901 additions and 202 deletions
|
|
@ -59,7 +59,7 @@ func Filter(text string, options *Options) (filtered string, err error) {
|
|||
// Strip away all HTML
|
||||
out := bytes.NewBuffer(nil)
|
||||
buf := bytes.NewBufferString(text)
|
||||
parser := xml.NewParser(buf)
|
||||
parser := xml.NewDecoder(buf)
|
||||
parser.Strict = false
|
||||
parser.AutoClose = xml.HTMLAutoClose
|
||||
parser.Entity = xml.HTMLEntity
|
||||
|
|
@ -112,7 +112,7 @@ func Filter(text string, options *Options) (filtered string, err error) {
|
|||
// Simplify the received HTML data by stripping away data URIs
|
||||
out := bytes.NewBuffer(nil)
|
||||
buf := bytes.NewBufferString(text)
|
||||
parser := xml.NewParser(buf)
|
||||
parser := xml.NewDecoder(buf)
|
||||
parser.Strict = false
|
||||
parser.AutoClose = xml.HTMLAutoClose
|
||||
parser.Entity = xml.HTMLEntity
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue