mirror of
https://github.com/Finb/Bark.git
synced 2026-04-26 06:25:55 +03:00
[GH-ISSUE #199] 关于url跳转带中文参数时效 #181
Labels
No labels
bug
enhancement
in progress
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Bark#181
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @wxjer on GitHub (May 31, 2023).
Original GitHub issue: https://github.com/Finb/Bark/issues/199
你好,
例子:https://bark.xxx.xx/key/title/content?url=taobao://s.taobao.com?q=abcd
如果q的值是英文,则能成功打开,如果是中文则无反应,整个url的参数都用了url编码(utf-8)
taobao%3A%2F%2Fs.taobao.com%3Fq%3Dabcd
taobao%3A%2F%2Fs.taobao.com%3Fq%3D%E8%9A%8A%E9%A6%99
麻烦有时间帮忙看一下
@Finb commented on GitHub (Jul 25, 2023):
首先要规范taobao 的URL,下面是对的
下面的是错误的,有中文的URL不合法
正确的应该是把中文编码一下
然后拼到bark参数里,因为整个taobao URL有特殊字符,所以也要URL编码一下
其中 urlencode 是URL编码的方法