mirror of
https://salsa.debian.org/mdosch/feed-to-muc.git
synced 2024-11-14 18:26:50 +01:00
20 lines
348 B
Go
20 lines
348 B
Go
|
package shared
|
||
|
|
||
|
import (
|
||
|
"io"
|
||
|
|
||
|
"golang.org/x/net/html/charset"
|
||
|
)
|
||
|
|
||
|
func NewReaderLabel(label string, input io.Reader) (io.Reader, error) {
|
||
|
conv, err := charset.NewReaderLabel(label, input)
|
||
|
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
// Wrap the charset decoder reader with a XML sanitizer
|
||
|
//clean := NewXMLSanitizerReader(conv)
|
||
|
return conv, nil
|
||
|
}
|