Skip to content

Commit

Permalink
Add style tag fixes to html cleaning code
Browse files Browse the repository at this point in the history
  • Loading branch information
pgaskin committed Jul 28, 2017
1 parent 9ea0a38 commit ee08531
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kepub/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ func cleanHTML(html *string) error {
// unicode replacement chars
*html = strings.Replace(*html, "�", "", -1)

// Add type to style tags
*html = strings.Replace(*html, `<style>`, `<style type="text/css">`, -1)

// ADEPT drm tags
adeptRe := regexp.MustCompile(`(<meta\s+content=".+"\s+name="Adept.expected.resource"\s+\/>)`)
*html = adeptRe.ReplaceAllString(*html, "")
Expand Down

0 comments on commit ee08531

Please sign in to comment.