json uit html -> html.Unescape
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"encoding/json"
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"html"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
@@ -183,7 +184,7 @@ func doArticle(filename string, url string, timestamp time.Time, needUpdate bool
|
||||
ok = false
|
||||
break
|
||||
} else {
|
||||
s2 = s[i1:i2]
|
||||
s2 = html.UnescapeString(s[i1:i2])
|
||||
}
|
||||
}
|
||||
if err = json.Unmarshal([]byte(s2), &doc); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user