mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
refactor(misc): fix a handful of TODO
This commit is contained in:
parent
06cbf1b3b3
commit
485baf9654
9 changed files with 18 additions and 27 deletions
|
@ -197,13 +197,6 @@ type SanitizerOptions struct {
|
|||
OpenLinksInNewTab bool
|
||||
}
|
||||
|
||||
// TODO: replace with SanitizeHTML, as it's only used in tests.
|
||||
func sanitizeHTMLWithDefaultOptions(baseURL, rawHTML string) string {
|
||||
return SanitizeHTML(baseURL, rawHTML, &SanitizerOptions{
|
||||
OpenLinksInNewTab: true,
|
||||
})
|
||||
}
|
||||
|
||||
func SanitizeHTML(baseURL, rawHTML string, sanitizerOptions *SanitizerOptions) string {
|
||||
var tagStack []string
|
||||
var parentTag string
|
||||
|
|
|
@ -13,6 +13,12 @@ import (
|
|||
"miniflux.app/v2/internal/config"
|
||||
)
|
||||
|
||||
func sanitizeHTMLWithDefaultOptions(baseURL, rawHTML string) string {
|
||||
return SanitizeHTML(baseURL, rawHTML, &SanitizerOptions{
|
||||
OpenLinksInNewTab: true,
|
||||
})
|
||||
}
|
||||
|
||||
func BenchmarkSanitize(b *testing.B) {
|
||||
var testCases = map[string][]string{
|
||||
"miniflux_github.html": {"https://github.com/miniflux/v2", ""},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue