Uncaught URIError: URI malformed at decodeURIComponent ( )


        var encodeSearchKey = function(key) {
            const encodeArr = [{
                code: '%',
                encode: '%25'
            }, {
                code: '?',
                encode: '%3F'
            }, {
                code: '#',
                encode: '%23'
            }, {
                code: '&',
                encode: '%26'
            }, {
                code: '=',
                encode: '%3D'
            }];
            return key.replace(/[%?#&=]/g, ($, index, str) => {
                for (const k of encodeArr) {
                    if (k.code === $) {
                        return k.encode;
                    }
                }
            });
        }

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM