mirror of
https://github.com/miniflux/v2.git
synced 2024-09-13 22:49:48 +02:00
168a870c02
For reference: https://go.dev/doc/go1.4#internalpackages
17 lines
543 B
Go
17 lines
543 B
Go
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package sanitizer // import "miniflux.app/v2/internal/reader/sanitizer"
|
|
|
|
import "testing"
|
|
|
|
func TestStripTags(t *testing.T) {
|
|
input := `This <a href="/test.html">link is relative</a> and <strong>this</strong> image: <img src="../folder/image.png"/>`
|
|
expected := `This link is relative and this image: `
|
|
output := StripTags(input)
|
|
|
|
if expected != output {
|
|
t.Errorf(`Wrong output: "%s" != "%s"`, expected, output)
|
|
}
|
|
}
|