logo

ScriptCat

  • Home
  • Community
  • Script List
  • Browser Extension
  1. /
  2. Script Market
  3. /
  4. 网站URL简化|去除杂乱参数
  • Overview
  • Code
  • Feedback
  • Ratings
  • Version List
ScriptCat
GitHub
Audit Logs
Service Agreement
Privacy Policy
Disclaimer

© 2022-Present ScriptCat. All rights reserved.

bing/baidu搜索字符转义错误重复刷新问题
Resolved#1432ttwjzCreated 9 months ago

Loading…
  • ttwjz9 months ago

    Loading…
  • smallbedrockI9 months ago

    Loading…
  • smallbedrockI9 months ago

    Loading…
  • smallbedrockI
    9 months agoclosed the feedback
  • ttwjz9 months ago

    Loading…
  • ttwjz
    9 months agoclosed the feedback
  • ttwjz9 months ago

    Loading…
  • ttwjz
    9 months agoreopened the feedback
  • smallbedrockI9 months ago

    Loading…
No data
Login to comment
Labels
Watch
Participants

当搜索字符串包含'时(即url编码%27)时,bing或baidu的搜索结果重复刷新。bug稳定复现。

        // 处理Bing搜索URL (包括国际版)
        if (settings.enableBing && (urlObj.hostname === 'cn.bing.com' || urlObj.hostname === 'www.bing.com') && urlObj.pathname === '/search') {
            const searchQuery = urlObj.searchParams.get('q');
            const firstParam = urlObj.searchParams.get('first');

            if (searchQuery) {
                // 使用URLSearchParams避免手工拼接
                const params = new URLSearchParams();
                params.append('q', searchQuery);

                if (firstParam) {
                    params.append('first', firstParam);
                }
                // 保持原始域名不变
                let newUrl = `https://${urlObj.hostname}/search?${params.toString()}`;
                // let newUrl = `https://${urlObj.hostname}/search?q=${encodeURIComponent(searchQuery)}`;
                // if (firstParam) {
                //     newUrl += `&first=${firstParam}`;
                // }
                ......

BIng模块已尝试修复。

已复现。

已解决。

360搜索也存在此类问题,可以考虑修复。

360搜索也存在此类问题,可以考虑修复。

已了解,考虑到这引擎几乎没人用,已经编写好更新,但防止多次更新的烦扰,下周正式更新