processor.go 526 B

12345678910111213141516
  1. // Copyright 2017 Frédéric Guillot. All rights reserved.
  2. // Use of this source code is governed by the Apache 2.0
  3. // license that can be found in the LICENSE file.
  4. package processor
  5. import (
  6. "github.com/miniflux/miniflux2/reader/rewrite"
  7. "github.com/miniflux/miniflux2/reader/sanitizer"
  8. )
  9. // ItemContentProcessor executes a set of functions to sanitize and alter item contents.
  10. func ItemContentProcessor(url, content string) string {
  11. content = sanitizer.Sanitize(url, content)
  12. return rewrite.Rewriter(url, content)
  13. }