Skip to content

Commit 27732cc

Browse files
authored
fix(drivers/quark): apply html escaping in quark (#2046)
* fix(drivers/quark): apply html escaping in quark
1 parent 29fcf59 commit 27732cc

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

drivers/quark_uc/util.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"encoding/base64"
77
"errors"
88
"fmt"
9+
"html"
910
"io"
1011
"net/http"
1112
"strconv"
@@ -70,10 +71,10 @@ func (d *QuarkOrUC) GetFiles(parent string) ([]model.Obj, error) {
7071
page := 1
7172
size := 100
7273
query := map[string]string{
73-
"pdir_fid": parent,
74-
"_size": strconv.Itoa(size),
75-
"_fetch_total": "1",
76-
"fetch_all_file": "1",
74+
"pdir_fid": parent,
75+
"_size": strconv.Itoa(size),
76+
"_fetch_total": "1",
77+
"fetch_all_file": "1",
7778
"fetch_risk_file_name": "1",
7879
}
7980
if d.OrderBy != "none" {
@@ -89,6 +90,7 @@ func (d *QuarkOrUC) GetFiles(parent string) ([]model.Obj, error) {
8990
return nil, err
9091
}
9192
for _, file := range resp.Data.List {
93+
file.FileName = html.UnescapeString(file.FileName)
9294
if d.OnlyListVideoFile {
9395
// 开启后 只列出视频文件和文件夹
9496
if file.IsDir() || file.Category == 1 {

0 commit comments

Comments
 (0)