-
-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
优化建议 #121
Comments
|
我尝试替换类似的url也是这样,sandbox里替换处理的结果就是url编码后的值,没有处理过。 网页上就是一点动静都没有 要替换的url是 规则是: {
"src": "https://www\.oschina\.net/action/GoToLink\?url=(.*)",
"kind": "regexp",
"dst": "$1",
"enable": true
} sandbox里提示如下: 匹配成功!https://www.oschina.net/action/GoToLink?url=https%3A%2F%2Flists.fedoraproject.org%2Farchives%2Flist%2Fdevel%40lists.fedoraproject.org%2Fthread%2FJUJV6BEJAXK5LATTSWGRFZDIAVM7KN4J%2F 被重定向到 https%3A%2F%2Flists.fedoraproject.org%2Farchives%2Flist%2Fdevel%40lists.fedoraproject.org%2Fthread%2FJUJV6BEJAXK5LATTSWGRFZDIAVM7KN4J%2F |
sandbox 有提示,说明规则没问题,那么大概率就是插件拿到的地址是没有 url encoding 的,用 encoding 之前的试试看? |
实测正则匹配出的url是编码后的url,浏览器不支持编码后的url跳转。插件需要在跳转前,把url重新解码,即%2f这些还原为:、/等。其他同类插件有做类似处理,可以优化一下,跟sanbox无关。
…---原始邮件---
发件人: "Jiacai ***@***.***>
发送时间: 2022年4月20日(周三) 下午4:13
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [jiacai2050/gooreplacer] 优化建议 (Issue #121)
sandbox 有提示,说明规则没问题,那么大概率就是插件拿到的地址是没有 url encoding 的,用 encoding 之前的试试看?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
同样的问题。
沙盒测试结果是 |
https://link.juejin.cn/?target=https%3A%2F%2Fhub.fastgit.xyz%2Falibaba%2Fp3c%2Ftree%2Fmaster%2Fp3c-formatter
我的替换规则是:
结果跳转不了
2. 能否增加一个pinned issue,专门用来共享广大使用者的规则,每个人都可以分享或借鉴别人的规则
The text was updated successfully, but these errors were encountered: