[GH-ISSUE #10] 当推送内容含有连接的时候不能成功推送 #7

Closed
opened 2026-03-03 11:55:17 +03:00 by kerem · 6 comments
Owner

Originally created by @FiveHair on GitHub (Jul 29, 2019).
Original GitHub issue: https://github.com/Finb/bark-server/issues/10

我在安卓用Tasker转发短信到Bark,但是短信内容有网址的时候推送就失效了,估计是多了"/"的事。怎么能规避这个情况呢?
能否忽略推送内容中的“/”呢?

Originally created by @FiveHair on GitHub (Jul 29, 2019). Original GitHub issue: https://github.com/Finb/bark-server/issues/10 我在安卓用Tasker转发短信到Bark,但是短信内容有网址的时候推送就失效了,估计是多了"/"的事。怎么能规避这个情况呢? 能否忽略推送内容中的“/”呢?
kerem closed this issue 2026-03-03 11:55:17 +03:00
Author
Owner

@Finb commented on GitHub (Jul 29, 2019):

你好,参数如果可能存在特殊字符,只需将整个 参数内容 URL编码一下即可

<!-- gh-comment-id:515909624 --> @Finb commented on GitHub (Jul 29, 2019): 你好,参数如果可能存在特殊字符,只需将整个 参数内容 URL编码一下即可
Author
Owner

@FiveHair commented on GitHub (Jul 29, 2019):

如果都写到?url=后面的话,推送显示不出来内容哇------------------ 原始邮件 ------------------
发件人: "Feng"notifications@github.com
发送时间: 2019年7月29日(星期一) 下午5:04
收件人: "Finb/bark-server"bark-server@noreply.github.com;
抄送: "FiveHair"1269560093@qq.com;"Author"author@noreply.github.com;
主题: Re: [Finb/bark-server] 当推送内容含有连接的时候不能成功推送 (#10)

你好,参数如果可能存在特殊字符,只需将整个 参数内容 URL编码一下即可


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<!-- gh-comment-id:515916838 --> @FiveHair commented on GitHub (Jul 29, 2019): 如果都写到?url=后面的话,推送显示不出来内容哇------------------ 原始邮件 ------------------ 发件人: "Feng"<notifications@github.com> 发送时间: 2019年7月29日(星期一) 下午5:04 收件人: "Finb/bark-server"<bark-server@noreply.github.com>; 抄送: "FiveHair"<1269560093@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [Finb/bark-server] 当推送内容含有连接的时候不能成功推送 (#10) 你好,参数如果可能存在特殊字符,只需将整个 参数内容 URL编码一下即可 &mdash; You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Author
Owner

@Finb commented on GitHub (Jul 29, 2019):

@FiveHair 你可以给我一个参数内容、想要显示的推送内容,我这边示范下怎么请求

<!-- gh-comment-id:515917418 --> @Finb commented on GitHub (Jul 29, 2019): @FiveHair 你可以给我一个参数内容、想要显示的推送内容,我这边示范下怎么请求
Author
Owner

@FiveHair commented on GitHub (Jul 29, 2019):

示例:/测试名称/测试内容http://www.baidu.com测试内容 如果全请求成url就看不见测试内容和网址了。 是不是只能用正则把特殊符号替换掉才行?------------------ 原始邮件 ------------------
发件人: "Feng"notifications@github.com
发送时间: 2019年7月29日(星期一) 下午5:27
收件人: "Finb/bark-server"bark-server@noreply.github.com;
抄送: "FiveHair"1269560093@qq.com;"Mention"mention@noreply.github.com;
主题: Re: [Finb/bark-server] 当推送内容含有连接的时候不能成功推送 (#10)

@FiveHair 你可以给我一个参数内容、想要显示的推送内容,我这边示范下怎么请求


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

<!-- gh-comment-id:515919050 --> @FiveHair commented on GitHub (Jul 29, 2019): 示例:/测试名称/测试内容http://www.baidu.com测试内容 如果全请求成url就看不见测试内容和网址了。 是不是只能用正则把特殊符号替换掉才行?------------------ 原始邮件 ------------------ 发件人: "Feng"<notifications@github.com> 发送时间: 2019年7月29日(星期一) 下午5:27 收件人: "Finb/bark-server"<bark-server@noreply.github.com>; 抄送: "FiveHair"<1269560093@qq.com>;"Mention"<mention@noreply.github.com>; 主题: Re: [Finb/bark-server] 当推送内容含有连接的时候不能成功推送 (#10) @FiveHair 你可以给我一个参数内容、想要显示的推送内容,我这边示范下怎么请求 &mdash; You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Author
Owner

@Finb commented on GitHub (Jul 29, 2019):

/{测试名称}/{测试内容http://www.baidu.com测试内容}
对{}内的内容URL编码即可,不要对整个推送url编码,仅对参数内容编码

最后编码结果

/%E6%B5%8B%E8%AF%95%E5%90%8D%E7%A7%B0/http%3A%2F%2Fwww.baidu.com%E6%B5%8B%E8%AF%95%E5%86%85%E5%AE%B9

最后请求URL
https://api.day.app/yourkey/%E6%B5%8B%E8%AF%95%E5%90%8D%E7%A7%B0/http%3A%2F%2Fwww.baidu.com%E6%B5%8B%E8%AF%95%E5%86%85%E5%AE%B9

<!-- gh-comment-id:515922183 --> @Finb commented on GitHub (Jul 29, 2019): /{测试名称}/{测试内容http://www.baidu.com测试内容} 对{}内的内容URL编码即可,不要对整个推送url编码,仅对参数内容编码 最后编码结果 /%E6%B5%8B%E8%AF%95%E5%90%8D%E7%A7%B0/http%3A%2F%2Fwww.baidu.com%E6%B5%8B%E8%AF%95%E5%86%85%E5%AE%B9 最后请求URL https://api.day.app/yourkey/%E6%B5%8B%E8%AF%95%E5%90%8D%E7%A7%B0/http%3A%2F%2Fwww.baidu.com%E6%B5%8B%E8%AF%95%E5%86%85%E5%AE%B9
Author
Owner

@FiveHair commented on GitHub (Jul 29, 2019):

好的,懂了! 谢谢------------------ 原始邮件 ------------------
发件人: "Feng"notifications@github.com
发送时间: 2019年7月29日(星期一) 下午5:40
收件人: "Finb/bark-server"bark-server@noreply.github.com;
抄送: "FiveHair"1269560093@qq.com;"Mention"mention@noreply.github.com;
主题: Re: [Finb/bark-server] 当推送内容含有连接的时候不能成功推送 (#10)

/{测试名称}/{测试内容http://www.baidu.com测试内容}
对{}内的内容URL编码即可,不要对整个推送url编码,仅对参数内容编码

最后编码结果

/%E6%B5%8B%E8%AF%95%E5%90%8D%E7%A7%B0/%E6%B5%8B%E8%AF%95%E5%86%85%E5%AE%B9http://www.baidu.com%E6%B5%8B%E8%AF%95%E5%86%85%E5%AE%B9

最后请求URL
https://api.day.app/yourkey/%E6%B5%8B%E8%AF%95%E5%90%8D%E7%A7%B0/http%3A%2F%2Fwww.baidu.com%E6%B5%8B%E8%AF%95%E5%86%85%E5%AE%B9


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

<!-- gh-comment-id:515929737 --> @FiveHair commented on GitHub (Jul 29, 2019): 好的,懂了! 谢谢------------------ 原始邮件 ------------------ 发件人: "Feng"<notifications@github.com> 发送时间: 2019年7月29日(星期一) 下午5:40 收件人: "Finb/bark-server"<bark-server@noreply.github.com>; 抄送: "FiveHair"<1269560093@qq.com>;"Mention"<mention@noreply.github.com>; 主题: Re: [Finb/bark-server] 当推送内容含有连接的时候不能成功推送 (#10) /{测试名称}/{测试内容http://www.baidu.com测试内容} 对{}内的内容URL编码即可,不要对整个推送url编码,仅对参数内容编码 最后编码结果 /%E6%B5%8B%E8%AF%95%E5%90%8D%E7%A7%B0/%E6%B5%8B%E8%AF%95%E5%86%85%E5%AE%B9http://www.baidu.com%E6%B5%8B%E8%AF%95%E5%86%85%E5%AE%B9 最后请求URL https://api.day.app/yourkey/%E6%B5%8B%E8%AF%95%E5%90%8D%E7%A7%B0/http%3A%2F%2Fwww.baidu.com%E6%B5%8B%E8%AF%95%E5%86%85%E5%AE%B9 &mdash; You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bark-server#7
No description provided.