gpt4 book ai didi

javascript - Chrome URL 多个空格问题

转载 作者:行者123 更新时间:2023-11-29 19:33:42 26 4
gpt4 key购买 nike

当我们有一个包含多个空格的 url 时,例如 /partofurl 2014/index,通常浏览器会将其编码为 /partofurl%20%202014/index
但是,当我在 chrome 中粘贴 /partofurl 2014/index 时,它会将多个空格视为单个空格并像这样对 URL 进行编码 /partofurl%202014/index 有没有办法阻止 chrome通过这样做?

最佳答案

Chromium 项目网站存在问题: https://code.google.com/p/chromium/issues/detail?id=361665

它的状态是 WontFix 并且有一个建议的解决方案 - 用百分比手动编码空格:

This is intentional. Users copying and pasting text with whitespace into the omnibox are usually pasting from e.g. emails or other places where there may be arbitrarily long strings of whitespace, so we collapse them. If you have a URL where you need multiple sequential space characters, percent-encode them.

关于javascript - Chrome URL 多个空格问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26094565/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com