kennygrant / sanitize

Package sanitize provides functions for sanitizing text in golang strings.
BSD 3-Clause "New" or "Revised" License
334 stars 72 forks source link

Multiple lines are joined after sanitizing. #15

Closed Pawka closed 8 years ago

Pawka commented 8 years ago

Go code:

package main

import (
    "fmt"

    "github.com/kennygrant/sanitize"
)

func main() {
    content := `<p>LINE 1<br />
LINE 2<br />
LINE 3</p>`
    fmt.Println(sanitize.HTML(content))
}

Will provide:

LINE 1LINE 2LINE 3

New lines are missing. I can fix this by myself, but want to be sure if you'll merge my PR as latest commit is 1 year old.