Commit 0df0a040 authored by wang's avatar wang

cronet

parent 376a1412
...@@ -9,6 +9,7 @@ import ( ...@@ -9,6 +9,7 @@ import (
"errors" "errors"
"github.com/andybalholm/brotli" "github.com/andybalholm/brotli"
"github.com/bogdanfinn/tls-client/profiles" "github.com/bogdanfinn/tls-client/profiles"
"github.com/bytedance/sonic/encoder"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/wmm1996528/cronet-go" "github.com/wmm1996528/cronet-go"
"io/ioutil" "io/ioutil"
...@@ -108,7 +109,9 @@ func (c *Client) GetText() string { ...@@ -108,7 +109,9 @@ func (c *Client) GetText() string {
content, _ := ioutil.ReadAll(c.Response.Body) content, _ := ioutil.ReadAll(c.Response.Body)
encoding := c.Response.Header.Get("Content-Encoding") encoding := c.Response.Header.Get("Content-Encoding")
DecompressBody(&content, encoding) DecompressBody(&content, encoding)
return string(content) toBytes := make([]byte, len(content))
content = encoder.HTMLEscape(toBytes, content)
return string(toBytes)
} }
func (c *Client) GetRespUrl() string { func (c *Client) GetRespUrl() string {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment