{"id":44571,"date":"2023-01-17T10:22:17","date_gmt":"2023-02-09T15:40:24","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%9b%be%e7%bb%8f%e8%af%af%e8%a7%a3encodeuricomponent%e6%98%af%e5%85%a8%e7%90%83%e6%a0%87%e5%87%86%e7%9a%84%e6%95%85%e4%ba%8b%e3%80%82\/"},"modified":"2024-04-29T10:14:42","modified_gmt":"2024-04-29T02:14:42","slug":"%e6%88%91%e6%9b%be%e7%bb%8f%e8%af%af%e8%a7%a3encodeuricomponent%e6%98%af%e5%85%a8%e7%90%83%e6%a0%87%e5%87%86%e7%9a%84%e6%95%85%e4%ba%8b%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%9b%be%e7%bb%8f%e8%af%af%e8%a7%a3encodeuricomponent%e6%98%af%e5%85%a8%e7%90%83%e6%a0%87%e5%87%86%e7%9a%84%e6%95%85%e4%ba%8b%e3%80%82\/","title":{"rendered":"\u6211\u66fe\u7ecf\u8bef\u89e3encodeURIComponent\u662f\u5168\u7403\u6807\u51c6\u7684\u6545\u4e8b"},"content":{"rendered":"<p>\u6211\u6b63\u5728\u64cd\u7eb5\u4e00\u4e2a\u7528\u4e8e\u4fee\u6539URL\u7684\u7a0b\u5e8f\uff0c\u7531\u4e8e\u89c4\u8303\u4e0d\u660e\u786e\u800c\u611f\u5230\u56f0\u60d1\uff0c\u6240\u4ee5\u6211\u5c06\u603b\u7ed3\u4e00\u4e0b\u3002<\/p>\n<p>2\/23: \u6dfb\u52a0\u8ffd\u8bd5\u90e8\u5206\u6ce8\u91ca<br \/>\n2018\/7\/14: \u6dfb\u52a0\u6709\u5173JavaScript\u7684URLSearchParams\u548cGo\u7684PathEscape\u7684\u6ce8\u91ca<\/p>\n<h1>\u4e8b\u60c5\u7684\u7ecf\u8fc7 de<\/h1>\n<p>HTTP\u662f\u4ec0\u4e48\uff0cGET\u548cPOST\u6709\u4ec0\u4e48\u533a\u522b\uff0c\u6bcf\u4e2a\u9009\u9879\u4e2d\u53c2\u6570\u662f\u5982\u4f55\u4f20\u9012\u5230\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\uff08\u5982CGI\uff09\u7684\uff0c\u6211\u90fd\u77e5\u9053\u3002\u6240\u4ee5\uff0c\u5f53\u5728Web\u4e0a\u4f7f\u7528XHR\u53d1\u9001GET\u8bf7\u6c42\u65f6\uff0c\u6211\u4ee5\u4e3a\u53ea\u9700\u8981\u4f7f\u7528JavaScript\u7684encodeURIComponent\uff08\uff09\u5bf9\u6bcf\u4e2a\u53c2\u6570\u8fdb\u884c\u7f16\u7801\uff0c\u7136\u540e\u7528&amp;\u8fde\u63a5\u8d77\u6765\uff0c\u518d\u4ee5?\u9644\u52a0\u5230URL\u7684\u672b\u5c3e\u5c31\u53ef\u4ee5\u4e86\u3002\u5c31\u50cf\u8fd9\u6837\u7684\u60f3\u6cd5\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"kd\">var<\/span> <span class=\"nx\">finalUrl<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"nx\">url<\/span><span class=\"p\">,<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">?<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span> <span class=\"nb\">encodeURIComponent<\/span><span class=\"p\">(<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">key<\/span><span class=\"dl\">\"<\/span><span class=\"p\">),<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">=<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span> <span class=\"nb\">encodeURIComponent<\/span><span class=\"p\">(<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">value<\/span><span class=\"dl\">\"<\/span><span class=\"p\">)].<\/span><span class=\"nx\">join<\/span><span class=\"p\">(<\/span><span class=\"dl\">\"\"<\/span><span class=\"p\">);<\/span>\r\n<\/code><\/pre>\n<p>\u63a5\u6536\u8fd9\u4e2a\u7684\u4e00\u65b9\u5e94\u8be5\u4f1a\u4f7f\u7528JavaScript\uff08node.js\uff09\u7684decodeURIComponent()\u51fd\u6570\u3002\u5728\u7f51\u7edc\u4e16\u754c\u4e2d\uff0cJavaScript\u662f\u4e3b\u6d41\u8bed\u8a00\uff0c\u5176\u4ed6\u8bed\u8a00\u7684Web API\u53ef\u80fd\u4f1a\u6309\u7167JavaScript\u7684\u6807\u51c6\u6765\u8bbe\u8ba1\u3002<\/p>\n<p>\u6211\u4ee5\u4e3aGolang\u7684net\/url\u5305\u4e2d\u7684url.QueryEscape()\u51fd\u6570\u8ddfencodeURIComponent()\u4f1a\u8fd4\u56de\u4e00\u6837\u7684\u7ed3\u679c\u3002\u6839\u636e\u6211\u7684\u611f\u89c9\uff0c\u7a7a\u683c\u5e94\u8be5\u4f1a\u53d8\u6210%20\uff0c\u4f46\u662f\u5728Golang\u4e2d\u5374\u53d8\u6210\u4e86+\u53f7\u3002\u5f53\u7528JavaScript\u7684decodeURIComponent()\u6765\u89e3\u7801Golang\u751f\u6210\u7684\u7f16\u7801\u5b57\u7b26\u4e32\u65f6\uff0c+\u53f7\u4ecd\u7136\u4fdd\u7559\u4e86\u4e0b\u6765\u3002\u73b0\u5728\u6709\u9ebb\u70e6\u4e86\uff0c\u5230\u5e95\u662f\u4ec0\u4e48\u539f\u56e0\u5462\uff1f<\/p>\n<h1>\u628a\u63e1\u76ee\u524d\u7684\u72b6\u51b5<\/h1>\n<h2>RFC\u53ef\u4ee5\u5728\u4e2d\u56fd\u653f\u5e9c\u5ba1\u67e5Internet\u5185\u5bb9\u65b9\u9762\u53d1\u6325\u91cd\u8981\u4f5c\u7528\u3002<\/h2>\n<p>\u5173\u4e8eURI\u7684\u683c\u5f0f\uff0c\u4eceRFC1738\uff081994\u5e74\uff09\u2192RFC2396\uff081998\u5e74\uff09\u2192RFC3986\uff082005\u5e74\uff09\u9010\u6e10\u5347\u7ea7\u3002\u6700\u65b0\u7248\u672c\u597d\u50cf\u6709Adobe\u7684\u4eba\u53c2\u4e0e\u8fdb\u6765\u3002\u54c7\u54e6\uff0c\u54c7\u54e6\u3002\u5982\u679c\u6709\u65f6\u95f4\u7684\u8bdd\uff0c\u6211\u7a0d\u540e\u4f1a\u53bb\u9605\u8bfb\u3002<\/p>\n<p>\u636eStack Overflow\u7684\u5e16\u5b50\u6240\u8ff0\uff0cGolang\u4f3c\u4e4e\u5bf9RFC\u975e\u5e38\u4e25\u683c\uff0c\u800cJavaScript\u5219\u7a0d\u663e\u968f\u610f\u3002<\/p>\n<h2>JavaScript\u7684\u8f6c\u4e49<\/h2>\n<p>\u5728JavaScript\u4e2d\uff0c\u6709\u4e24\u4e2a\u65b9\u6cd5\u53ef\u4ee5\u7528\u6765\u5bf9URI\u8fdb\u884c\u7f16\u7801\uff0c\u5b83\u4eec\u5206\u522b\u662fencodeURI()\u548cencodeURIComponent()\u3002encodeURI()\u65b9\u6cd5\u4f1a\u4fdd\u7559\u7b26\u53f7&amp;\u3001=\u548c\/\uff0c\u5e76\u4e14\u53ef\u4ee5\u63a5\u6536\u4e00\u4e2a\u5b8c\u6574\u7684URI\u4f5c\u4e3a\u53c2\u6570\uff0c\u8fd4\u56de\u4e00\u4e2a\u53ef\u76f4\u63a5\u7528\u4f5cURI\u7684\u5b57\u7b26\u4e32\u3002\u800cencodeURIComponent()\u65b9\u6cd5\u4f1a\u8fd4\u56de\u4e00\u4e2a\u5b89\u5168\u7684\u5b57\u7b26\u4e32\uff0c\u53ef\u4ee5\u7528\u4f5c\u67e5\u8be2\u53c2\u6570\uff0c\u4e0d\u4f1a\u7834\u574fURI\u7684\u542b\u4e49\u3002\u672c\u7bc7\u6587\u7ae0\u53ea\u4ecb\u7ecd\u540e\u8005\u3002<\/p>\n<p>\u6839\u636eMDN\u7684\u8bf4\u660e\uff0c\u5f53\u4f7f\u7528Content-Type\u4e3aapplication\/x-www-form-urlencoded\uff08POST\uff09\u8fdb\u884c\u53d1\u9001\u65f6\uff0c\u8fd8\u8981\u5c06%20\u8fdb\u4e00\u6b65\u8f6c\u6362\u4e3a+\u53f7\u3002\u6b64\u5916\uff0c\u8fd8\u9700\u8981\u7f16\u5199\u7b26\u5408RFC-3986\u4e25\u683c\u89c4\u8303\u7684\u4ee3\u7801\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"kd\">function<\/span> <span class=\"nx\">fixedEncodeURIComponent<\/span> <span class=\"p\">(<\/span><span class=\"nx\">str<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\r\n  <span class=\"k\">return<\/span> <span class=\"nb\">encodeURIComponent<\/span><span class=\"p\">(<\/span><span class=\"nx\">str<\/span><span class=\"p\">).<\/span><span class=\"nx\">replace<\/span><span class=\"p\">(<\/span><span class=\"sr\">\/<\/span><span class=\"se\">[<\/span><span class=\"sr\">!'()*<\/span><span class=\"se\">]<\/span><span class=\"sr\">\/g<\/span><span class=\"p\">,<\/span> <span class=\"kd\">function<\/span><span class=\"p\">(<\/span><span class=\"nx\">c<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\r\n    <span class=\"k\">return<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">%<\/span><span class=\"dl\">'<\/span> <span class=\"o\">+<\/span> <span class=\"nx\">c<\/span><span class=\"p\">.<\/span><span class=\"nx\">charCodeAt<\/span><span class=\"p\">(<\/span><span class=\"mi\">0<\/span><span class=\"p\">).<\/span><span class=\"nx\">toString<\/span><span class=\"p\">(<\/span><span class=\"mi\">16<\/span><span class=\"p\">);<\/span>\r\n  <span class=\"p\">});<\/span>\r\n<span class=\"p\">}<\/span>\r\n<\/code><\/pre>\n<p>\u603b\u4e4b\uff0c\u5373\u8868\u793aJavaScript\u7684\u8f6c\u4e49\u89c4\u8303\u4e0e\u6700\u65b0\u7684RFC\u4e0d\u517c\u5bb9\u3002\u6211\u4e4b\u524d\u4ee5\u4e3a\u5728\u6d4f\u89c8\u5668\u4e2d\u641c\u7d22\u65f6\uff0c\u7a7a\u683c\u603b\u662f\u4f1a\u53d8\u6210%20\uff0c\u4f46\u73b0\u5728\u5728\u7f51\u7ad9\u4e0a\u641c\u7d22\u5374\u53d8\u6210\u4e86+\u7684\u6837\u5b50\u3002\u4e4b\u524d\u5c31\u662f\u8fd9\u6837\u7684\u5417\uff1f\u4e0d\u8fc7\uff0c\u636e\u8bf4\u5728\u4e0d\u540c\u7684\u5730\u65b9\u53ef\u80fd\u4f1a\u6709\u4e0d\u540c\u7684\u60c5\u51b5\u3002<\/p>\n<blockquote><p>@shibu_jp \u6211\u4eec\u975e\u5e38\u611f\u8c22GitHub\u7684\u5e2e\u52a9\u3002\u4f46\u662f\u636e\u8bf4\u8c37\u6b4c\u4eceChrome\u7684\u5730\u5740\u680f\u8fdb\u884c\u641c\u7d22\u65f6\u4f1a\u53d8\u6210%\uff0c\u5bf9\u5427\u3002\u2014\u6751\u5ca1\u592a\u90ce\uff08@kaoriya\uff09 2015\u5e742\u670822\u65e5<\/p><\/blockquote>\n<p>\u5728ECMAScript\u6807\u51c6JavaScript\u8303\u56f4\u5185\uff0c\u53ea\u6709encodeURIComponent()\u51fd\u6570\u53ef\u7528\uff0c\u4f46\u662f\u5728node.js\u4e2d\uff0c\u6709\u4e00\u4e2a\u540d\u4e3aquerystring\u7684\u6a21\u5757\u53ef\u4ee5\u652f\u6301\u4e25\u683c\u9075\u5faaRFC\u7684\u7248\u672c\u3002express\u4f3c\u4e4e\u4f7f\u7528\u4e86\u4e00\u4e2a\u540d\u4e3aqs\u7684\u7b2c\u4e09\u65b9\u6a21\u5757\u3002<\/p>\n<p>2018\u5e747\u670814\u65e5<\/p>\n<p>\u5728\u7f51\u9875\u6d4f\u89c8\u5668\u4e2d\uff0c\u5df2\u7ecf\u5b9e\u73b0\u4e86\u4e00\u4e2a\u540d\u4e3aURLSearchParams\u7684\u7c7b\u3002Node.js\u4e5f\u4ece8.0\u7248\u672c\u5f00\u59cb\u5b9e\u73b0\u4e86\u8be5\u7c7b\u3002\u8fd9\u4e2a\u7c7b\u53ef\u4ee5\u6b63\u5e38\u5730\u5904\u7406&#8221;+&#8221;\u3002\u800c\u4e14\uff0c\u5b83\u8fd8\u80fd\u4e00\u6b21\u6027\u5904\u7406\u6570\u7ec4\u64cd\u4f5c\u3001\u89e3\u6790\u7b49\u7e41\u7410\u7684\u4efb\u52a1\uff0c\u6240\u4ee5\u4ee5\u540e\u5927\u5bb6\u8981\u79ef\u6781\u5730\u4f7f\u7528\u5b83\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"o\">&gt;&gt;&gt;<\/span> <span class=\"kd\">const<\/span> <span class=\"nx\">params<\/span> <span class=\"o\">=<\/span> <span class=\"k\">new<\/span> <span class=\"nx\">URLSearchParams<\/span><span class=\"p\">()<\/span>\r\n<span class=\"o\">&gt;&gt;&gt;<\/span> <span class=\"nx\">params<\/span><span class=\"p\">.<\/span><span class=\"nx\">append<\/span><span class=\"p\">(<\/span><span class=\"dl\">\"<\/span> <span class=\"dl\">\"<\/span><span class=\"p\">,<\/span> <span class=\"dl\">\"<\/span> <span class=\"dl\">\"<\/span><span class=\"p\">)<\/span>\r\n<span class=\"o\">&gt;&gt;&gt;<\/span> <span class=\"nx\">params<\/span><span class=\"p\">.<\/span><span class=\"nx\">toString<\/span><span class=\"p\">();<\/span>\r\n<span class=\"dl\">\"<\/span><span class=\"s2\">+=+<\/span><span class=\"dl\">\"<\/span>\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">URLSearchParams (MDN)<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">URLSearchParams\u306b\u3088\u308b\u7c21\u5358URL\u64cd\u4f5c (Qiita @yoichiro6642<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">2016\u5e7402\u670809\u65e5\u306b\u66f4\u65b0<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u3055\u3093)<\/ul>\n<h2>Golang\u7684\u8f6c\u4e49<\/h2>\n<p>\u5728Golang\u4e2d\uff0c\u63d0\u4f9b\u4e86net\/url\u6a21\u5757\u3002\u8c03\u7528url.Values.Encode()\u53ef\u4ee5\u751f\u6210\u8f6c\u4e49\u641c\u7d22\u67e5\u8be2\u5b57\u7b26\u4e32\u3002\u901a\u8fc7\u9605\u8bfb\u6e90\u4ee3\u7801\u53ef\u4ee5\u53d1\u73b0\uff0c\u5b83\u5728\u6bcf\u4e2a\u7ec4\u4ef6\u8f6c\u6362\u4e2d\u90fd\u4f7f\u7528\u4e86url.QueryEscape\u51fd\u6570\u3002\u8fd9\u4e2a\u51fd\u6570\u5185\u90e8\u4f7f\u7528\u4e86\u4e00\u4e2a\u79c1\u6709\u51fd\u6570escape\uff0c\u5e76\u4e14\u8fd9\u4e2a\u51fd\u6570\u7684\u8f6c\u6362\u65b9\u5f0f\u5728\u4e0d\u540c\u6a21\u5f0f\u4e0b\u6709\u4e00\u4e9b\u53d8\u5316\u3002\u5728\u7f16\u7801\u8def\u5f84\u90e8\u5206\u65f6\uff0c\u7a7a\u683c\u4f1a\u88ab\u7f16\u7801\u6210%20\uff0c\u4f46\u5728\u67e5\u8be2\u90e8\u5206\u7684\u6a21\u5f0f\uff08\u4e0eurl.QueryEscape()\u76f8\u540c\uff09\u4e0b\uff0c\u4f1a\u88ab\u7f16\u7801\u6210+\u3002\u4f7f\u7528mattn\u5148\u751f\u63d0\u4f9b\u7684\u65b9\u6cd5\u4e5f\u53ef\u4ee5\u5c06\u5176\u7f16\u7801\u4e3a%20\u3002<\/p>\n<blockquote><p>\u5c06(&amp;url.URL{Path:foo}).String() \u7f16\u7801\u6210\u50cf\u307f\u305f\u3044\u7684\u6837\u5b50\u53ef\u4ee5\u505a\u5230\uff0c\u4e4b\u7c7b\u7684 #golang\u2014 mattn (@mattn_jp) 2015\u5e742\u670822\u65e5<\/p><\/blockquote>\n<p>2018\u5e747\u670814\u65e5<\/p>\n<p>\u4eceGo 1.8\u5f00\u59cb\uff0curl.PathEscape\u65b9\u6cd5\u88ab\u63d0\u4f9b\uff0c\u56e0\u6b64\u65e0\u9700\u8d39\u529b\u4f7f\u7528\u79c1\u6709\u51fd\u6570\uff0c\u5c31\u80fd\u591f\u5bf9\u8def\u5f84\u90e8\u5206\u8fdb\u884c\u8f6c\u4e49\u3002mattn\u5148\u751f\uff0c\u975e\u5e38\u611f\u8c22\u60a8\u7684\u8bc4\u8bba\u3002<\/p>\n<h2>Python\u7684\u8f6c\u4e49\u5b57\u7b26<\/h2>\n<p>Python3\u7684urllib.parse\u6a21\u5757\u4e2d\u6709quote()\u548cquote_plus()\u51fd\u6570\u3002quote()\u7c7b\u4f3c\u4e8eJS\u7684\u7f16\u7801\u65b9\u5f0f\uff0c\u800cquote_plus()\u5219\u7c7b\u4f3c\u4e8eGolang\u7684\u7f16\u7801\u65b9\u5f0f\u3002\u771f\u4e0d\u6127\u662f\u6211\u4eec\u4f1f\u5927\u7684Python\uff0c\u5904\u7406\u5f97\u5982\u6b64\u6d41\u7545\u3002<\/p>\n<h1>\u6700\u7ec8\u5e94\u8be5\u505a\u4ec0\u4e48\u51b3\u5b9a\uff1f<\/h1>\n<p>\u73fe\u72b6\u7684\u8a8d\u8b58\u662f\uff0c\u96d6\u7136Golang\u7684\u884c\u70ba\u662f\u6b63\u78ba\u7684\uff0c\u4f46\u5be6\u969b\u4e0a\u53ef\u80fd\u6703\u6709\u4e00\u4e9b\u50cfJavaScript\u90a3\u6a23\u4f7f\u7528\u820a\u7248\u672c\u898f\u7bc4\u7684\u5ba2\u6236\u7aef\u767c\u9001\u67e5\u8a62\u7684\u60c5\u6cc1\u3002\u7576\u7136\uff0c\u4e5f\u53ef\u4ee5\u5728JavaScript\u4e2d\u56b4\u683c\u9075\u5b88\u7de8\u78bc\uff0c\u4f46\u4e26\u4e0d\u7e3d\u662f\u9019\u6a23\uff08\u5373\u4f7f\u5728Chrome\u7684\u5730\u5740\u6b04\u4e2d\u4e5f\u662f\u5982\u6b64\uff09\u3002<\/p>\n<p>\u6240\u4ee5\uff0c\u5728\u670d\u52a1\u5668\u7aef\uff0c\u5fc5\u987b\u786e\u4fdd\u80fd\u591f\u6b63\u786e\u89e3\u91ca\u65e0\u8bba\u4ee5\u54ea\u79cd\u65b9\u5f0f\u521b\u5efa\u7684\u7a7a\u683c\u3002\u55ef\uff0c\u8fd9\u65b9\u9762\u662f\u7531Web\u5e94\u7528\u670d\u52a1\u5668\u6846\u67b6\u81ea\u52a8\u5904\u7406\u7684\uff0c\u9664\u975e\u662f\u4f7f\u7528\u5957\u63a5\u5b57\u6216\u4f4e\u7ea7\u522b\u7684HTTP API\u6765\u521b\u5efaWeb\u5e94\u7528\u7a0b\u5e8f\u7684\u5f00\u53d1\u4eba\u5458\uff0c\u5426\u5219\u53ef\u80fd\u4e0d\u9700\u8981\u8003\u8651\u8fd9\u4e2a\u95ee\u9898&#8230;<\/p>\n<blockquote><p>\u5927\u5bb6\uff01WebGL\u662f\u4e00\u79cd\u4f4e\u7ea7\u522b\u7684API\uff01\u7528WebGL\u5236\u4f5c\u6e38\u620f\uff0c\u5c31\u50cf\u7528\u5957\u63a5\u5b57\u7f16\u5199HTTP\u670d\u52a1\u5668\u4e00\u6837\uff01\u5927\u5bb6\u60f3\u8981\u7528\u5957\u63a5\u5b57\u7f16\u5199HTTP\u670d\u52a1\u5668\u5417\uff1f\u5f53\u7136\u60f3\u5566\uff01\uff01\uff01<\/p><\/blockquote>\n<p>\u5ba2\u6237\u7aef\u9700\u8981\u8fdb\u884c\u4e25\u683c\u7684RFC3986\u7f16\u7801\uff0c\u65e0\u8bba\u8bf7\u6c42\u662fapplication\/x-www-form-urlencoded\u8fd8\u662f\u5176\u4ed6\u5185\u5bb9\u3002\u76ee\u524d\u6765\u770b\uff0c\u597d\u50cf\u4e0d\u9700\u8981\u5bf9\u6b63\u5728\u7f16\u5199\u7684\u4ee3\u7801\u8fdb\u884c\u4fee\u6539\u3002<\/p>\n<p>\u5728Twitter\u4e0a\u7d66\u4e88\u5404\u7a2e\u8a55\u8ad6\u7684\u670b\u53cb\u5011\uff0c\u975e\u5e38\u611f\u8b1d\u4f60\u5011\u3002<\/p>\n<h1>\u95ee\u9898: \u7f51\u9875\u8868\u5355\u4e0eRFC\u65e0\u5173\u5417\uff1f<\/h1>\n<p>\u6211\u7d66\u4e86\u4e00\u500b\u8a55\u8ad6\uff0c\u611f\u89ba\u5f88\u597d\u7684\u662f\uff0c\u7576\u5c07\u8cc7\u8a0a\u767c\u5e03\u51fa\u53bb\u6642\uff0c\u77e5\u8b58\u6703\u5f48\u56de\u4f86\u3002<\/p>\n<blockquote><p>http:\/\/t.co\/lExZOEpwPn<br \/>\nHTML\u89c4\u5b9a\u5728\u67e5\u8be2\u5b57\u7b26\u4e32\u7b49\u5730\u65b9\u5c06\u7a7a\u683c\u6539\u4e3a\u52a0\u53f7+\uff0c\u4e0eRFC 3986\u65e0\u5173\u3002\u9664\u67e5\u8be2\u5916\uff0c\u4e0d\u5e94\u8be5\u81ea\u884c\u5c06\u7a7a\u683c\u6539\u4e3a\u52a0\u53f7+\uff0c\u800c\u5e94\u8be5\u6539\u4e3a%20\u3002Go\u8bed\u8a00\u4e25\u683c\u5bf9\u5f85\u7684\u662f!'()*\uff0c\u4e0e\u7a7a\u683c\u65e0\u5173\u3002\u2014 \u308b\u3068 (@cocoa_ruto) 2021\u5e749\u670819\u65e5<\/p><\/blockquote>\n<p>\u6211\u660e\u767d\u4e86\u3002RFC\u4e0e\u6b64\u65e0\u5173\u3002\u786e\u5b9e\uff0c\u5728HTML5\u7684w3c\u89c4\u8303\u4e2d\uff0c\u6709\u5173\u8868\u5355\u63d0\u4ea4\u7684\u5185\u5bb9\u662f\u5177\u4f53\u63cf\u8ff0\u7684\u3002\u8fd9\u4e2a\u94fe\u63a5\u4e2d\u76844.5\u4ee5\u4e0b\u90e8\u5206\u8bf4\u660e\u4e86\u5404\u4e2a\u90e8\u5206\u7684\u8f6c\u6362\u65b9\u6cd5\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u5982\u679c\u662f\u534a\u89d2\u7a7a\u683c\uff080x20\uff09\uff0c\u5219\u8f6c\u6362\u4e3a\u52a0\u53f7\uff080x2B\uff09\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u5b57\u6bcdA-Z\u3001a-z\u3001\u6570\u5b570-9\u3001\u661f\u53f7\uff08*\uff09\u3001\u51cf\u53f7\uff08-\uff09\u3001\u53e5\u70b9\uff08.\uff09\u3001\u4e0b\u5212\u7ebf\uff08_\uff09\u4fdd\u6301\u4e0d\u53d8\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\u5176\u4ed6\u5b57\u7b26\u8f6c\u6362\u4e3a\u767e\u5206\u53f7\u52a0\u4e0a\u5176\u7f16\u7801\u3002<\/ol>\n<p>\u55ef\uff0c\u539f\u6765\u5982\u6b64\u3002\u56e0\u4e3aGo\u5728net\/http\u793a\u4f8b\u4e2d\u4f7f\u7528\u4e86url.Values\uff0c\u6240\u4ee5\u6211\u4eec\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528\u5b83\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"n\">gore<\/span><span class=\"o\">&gt;<\/span> <span class=\"o\">:<\/span><span class=\"k\">import<\/span> <span class=\"n\">net<\/span><span class=\"o\">\/<\/span><span class=\"n\">url<\/span>\r\n<span class=\"n\">gore<\/span><span class=\"o\">&gt;<\/span> <span class=\"n\">url<\/span><span class=\"o\">.<\/span><span class=\"n\">Values<\/span><span class=\"p\">{<\/span><span class=\"s\">\"key\"<\/span><span class=\"o\">:<\/span> <span class=\"p\">{<\/span><span class=\"s\">\"!<\/span><span class=\"se\">\\\"<\/span><span class=\"s\">#$%&amp;'()*+,-.\/:;&lt;=&gt;?@<\/span><span class=\"se\">\\\\<\/span><span class=\"s\">[]^_\"<\/span><span class=\"p\">}}<\/span><span class=\"o\">.<\/span><span class=\"n\">Encode<\/span><span class=\"p\">()<\/span>\r\n<span class=\"s\">\"key=%21%22%23%24%25%26%27%28%29%2A%2B%2C-.%2F%3A%3B%3C%3D%3E%3F%40%5C%5B%5D%5E_\"<\/span>\r\n<\/code><\/pre>\n<p>\u55ef&#8230;\u539f\u672c\u61c9\u8a72\u8981\u4fdd\u7559\u7684\u300c*\u300d\u88ab\u8f49\u63db\u6389\u4e86&#8230;Golang\u5728\u5167\u90e8\u8abf\u7528\u4e86url.QueryEscape()\uff0c\u56e0\u6b64\u76f8\u7576\u65bcRFC3986\u3002<\/p>\n<p>\u90a3\u4e48Python\u600e\u4e48\u6837\u5462\uff1f<\/p>\n<pre class=\"post-pre\"><code><span class=\"o\">&gt;&gt;&gt;<\/span> <span class=\"kn\">import<\/span> <span class=\"nn\">urllib.parse<\/span>\r\n<span class=\"o\">&gt;&gt;&gt;<\/span> <span class=\"n\">urllib<\/span><span class=\"p\">.<\/span><span class=\"n\">parse<\/span><span class=\"p\">.<\/span><span class=\"n\">quote_plus<\/span><span class=\"p\">(<\/span><span class=\"s\">\"!<\/span><span class=\"se\">\\\"<\/span><span class=\"s\">#$%&amp;'()*+,-.\/:;&lt;=&gt;?@<\/span><span class=\"se\">\\\\<\/span><span class=\"s\">[]^_\"<\/span><span class=\"p\">)<\/span>\r\n<span class=\"s\">'%21%22%23%24%25%26%27%28%29%2A%2B%2C-.%2F%3A%3B%3C%3D%3E%3F%40%5C%5B%5D%5E_'<\/span>\r\n<\/code><\/pre>\n<p>\u4e0eGolang\u7684\u7ed3\u679c\u76f8\u540c\u3002<\/p>\n<p>\u4f7f\u7528riocampos\u5148\u751f\u5728\u8bc4\u8bba\u4e2d\u544a\u8bc9\u6211\u7684Ruby WEBrick\u5e93\u8fdb\u884c\u6d4b\u8bd5\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"n\">irb<\/span><span class=\"o\">&gt;<\/span> <span class=\"nb\">require<\/span> <span class=\"s1\">'webrick\/httputils'<\/span>\r\n<span class=\"n\">irb<\/span><span class=\"o\">&gt;<\/span> <span class=\"nb\">puts<\/span> <span class=\"no\">WEBrick<\/span><span class=\"o\">::<\/span><span class=\"no\">HTTPUtils<\/span><span class=\"p\">.<\/span><span class=\"nf\">escape_form<\/span><span class=\"p\">(<\/span><span class=\"s2\">\"!<\/span><span class=\"se\">\\\"<\/span><span class=\"s2\">#$%&amp;'()*+,-.\/:;&lt;=&gt;?@<\/span><span class=\"se\">\\\\<\/span><span class=\"s2\">[]^_\"<\/span><span class=\"p\">)<\/span>\r\n<span class=\"o\">!%<\/span><span class=\"mi\">22<\/span><span class=\"o\">%<\/span><span class=\"mi\">23<\/span><span class=\"o\">%<\/span><span class=\"mi\">24<\/span><span class=\"o\">%<\/span><span class=\"mi\">25<\/span><span class=\"o\">%<\/span><span class=\"mi\">26<\/span><span class=\"err\">'<\/span><span class=\"p\">()<\/span><span class=\"o\">*%<\/span><span class=\"mi\">2<\/span><span class=\"no\">B<\/span><span class=\"o\">%<\/span><span class=\"mi\">2<\/span><span class=\"no\">C<\/span><span class=\"o\">-<\/span><span class=\"p\">.<\/span><span class=\"nf\">%<\/span><span class=\"mi\">2<\/span><span class=\"no\">F<\/span><span class=\"o\">%<\/span><span class=\"mi\">3<\/span><span class=\"no\">A<\/span><span class=\"o\">%<\/span><span class=\"mi\">3<\/span><span class=\"no\">B<\/span><span class=\"o\">%<\/span><span class=\"mi\">3<\/span><span class=\"no\">C<\/span><span class=\"o\">%<\/span><span class=\"mi\">3<\/span><span class=\"no\">D<\/span><span class=\"o\">%<\/span><span class=\"mi\">3<\/span><span class=\"no\">E<\/span><span class=\"o\">%<\/span><span class=\"mi\">3<\/span><span class=\"no\">F<\/span><span class=\"o\">%<\/span><span class=\"mi\">40<\/span><span class=\"o\">%<\/span><span class=\"mi\">5<\/span><span class=\"no\">C<\/span><span class=\"o\">%<\/span><span class=\"mi\">5<\/span><span class=\"no\">B<\/span><span class=\"o\">%<\/span><span class=\"mi\">5<\/span><span class=\"no\">D<\/span><span class=\"o\">%<\/span><span class=\"mi\">5<\/span><span class=\"no\">E_<\/span>\r\n<\/code><\/pre>\n<p>\u90a3\u4e2a&#8230;&#8230;\u672c\u6765\u5e94\u8be5\u8981\u8f6c\u6362\u7684\u4e1c\u897f\uff0c\u5374\u8fd8\u5269\u4e0b\u4e86&#8221;()\u3001\u3002<\/p>\n<p>\u6ca1\u6709\u4ee5\u89c4\u683c\u8981\u6c42\u5b9e\u73b0\u7684\u5904\u7406\u7cfb\u7edf\u7684\u51b2\u51fb\u7ed3\u679c\uff08\u9664\u4e86\u63d0\u4f9b\u4e86\u53c2\u8003\u5b9e\u73b0\u7684JavaScript\u4e4b\u5916\uff09\u3002\u5c06\u5176\u8f6c\u6362\u4e3a% xx\u7684\u64cd\u4f5c\u53ef\u80fd\u662f\u4f7f\u7528\u901a\u7528\u903b\u8f91\u5b9e\u73b0\u7684\uff0c\u6240\u4ee5\u4f7f\u7528Golang\u6216Python\u53ef\u80fd\u66f4\u5b89\u5168\u3002\u55ef\uff0c\u56e0\u4e3a\u5b83\u4e0d\u662f\u63a7\u5236\u5b57\u7b26\uff0c\u6240\u4ee5\u4f7f\u7528Ruby\u65b9\u5f0f\u53d1\u9001\u5e94\u8be5\u4e0d\u4f1a\u6210\u4e3a\u95ee\u9898\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u786e\u5b9e\u5982\u8bc4\u8bba\u6240\u63d0\u5230\u7684\uff0c\u73b0\u5728\u4e0eRFC\u6ca1\u6709\u5173\u7cfb\uff0c\u4f46\u662f\u4ee5\u524dHTML\u662f\u6839\u636eRFC1866\u7684\u89c4\u5b9a\uff0c\u5728\u5176\u4e2d\u63cf\u8ff0\u4e86\u6709\u5173\u8868\u5355\u8f6c\u6362\u7684\u5185\u5bb9\u3002\u5728\u90a3\u4e2a\u65f6\u5019\uff0c\u5df2\u7ecf\u63d0\u5230\u4e86\u7a7a\u683c\u5e94\u8be5\u88ab\u8f6c\u6362\u4e3a\u52a0\u53f7\u3002\u4f46\u662f\uff0c\u5e76\u6ca1\u6709\u8be6\u7ec6\u8bf4\u660e\u8f6c\u6362\u7684\u65b9\u6cd5\u3002\u4e4b\u540e\uff0c\u6839\u636eRFC2854\u8fdb\u884c\u4e86\u66f4\u65b0\uff0c\u4f46\u662f\u5176\u4e2d\u6ca1\u6709\u63cf\u8ff0\u89c4\u8303\uff0cW3C\u65b9\u9762\u5c06\u8d1f\u8d23\u5904\u7406\u672a\u6765\u7684\u7e41\u7410\u5de5\u4f5c\u3002\u539f\u6765\u5982\u6b64\u3002<\/p>\n<h2>\u8ffd\u52a0\u8bb0\u5f55\u7684\u603b\u7ed3<\/h2>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">URI\u306eQuery\u306fRFC3986\u3002Golang\u3068Python\u304c\u305d\u308c\u3092\u6e80\u305f\u3057\u3066\u3044\u308b\u3002JavaScript, Ruby\u306f\u3061\u3087\u3073\u3063\u3068\u9055\u3046\u7d50\u679c\u3092\u8fd4\u3059\uff1f<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">POST\u6642\u306e\u30a8\u30f3\u30b3\u30fc\u30c9(application\/x-www-form-urlencoded)\u306b\u95a2\u3057\u3066\u306fRFC\u3067\u306f\u306a\u304f\u3001HTML5\u306e\u4ed5\u69d8\u306b\u66f8\u304b\u308c\u3066\u3044\u308b\u3002RFC3986\u306e\u5909\u63db\u3068\u306f\u5fae\u5999\u306b\u7570\u306a\u308b\u3002\u3067\u3001\u305d\u308c\u3092\u6e80\u305f\u3057\u305f\u30a8\u30f3\u30b3\u30fc\u30c0\u306f\u73fe\u6642\u70b9\u3067\u306f\u898b\u5f53\u305f\u3089\u305a\u3002JS\u306b\u95a2\u3057\u3066\u306fMDN\u306b\u53c2\u8003\u5b9f\u88c5\u3042\u308a\u3002<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u6b63\u5728\u64cd\u7eb5\u4e00\u4e2a\u7528\u4e8e\u4fee\u6539URL\u7684\u7a0b\u5e8f\uff0c\u7531\u4e8e\u89c4\u8303\u4e0d\u660e\u786e\u800c\u611f\u5230\u56f0\u60d1\uff0c\u6240\u4ee5\u6211\u5c06\u603b\u7ed3\u4e00\u4e0b\u3002 2\/23: \u6dfb\u52a0\u8ffd\u8bd5\u90e8\u5206\u6ce8\u91ca [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-44571","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u6211\u66fe\u7ecf\u8bef\u89e3encodeURIComponent\u662f\u5168\u7403\u6807\u51c6\u7684\u6545\u4e8b - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u6211\u66fe\u7ecf\u8bef\u89e3encodeuricomponent\u662f\u5168\u7403\u6807\u51c6\u7684\u6545\u4e8b\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6211\u66fe\u7ecf\u8bef\u89e3encodeURIComponent\u662f\u5168\u7403\u6807\u51c6\u7684\u6545\u4e8b\" \/>\n<meta property=\"og:description\" content=\"\u6211\u6b63\u5728\u64cd\u7eb5\u4e00\u4e2a\u7528\u4e8e\u4fee\u6539URL\u7684\u7a0b\u5e8f\uff0c\u7531\u4e8e\u89c4\u8303\u4e0d\u660e\u786e\u800c\u611f\u5230\u56f0\u60d1\uff0c\u6240\u4ee5\u6211\u5c06\u603b\u7ed3\u4e00\u4e0b\u3002 2\/23: \u6dfb\u52a0\u8ffd\u8bd5\u90e8\u5206\u6ce8\u91ca [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u6211\u66fe\u7ecf\u8bef\u89e3encodeuricomponent\u662f\u5168\u7403\u6807\u51c6\u7684\u6545\u4e8b\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-02-09T15:40:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-29T02:14:42+00:00\" \/>\n<meta name=\"author\" content=\"\u6e05, \u626c\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6e05, \u626c\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%9b%be%e7%bb%8f%e8%af%af%e8%a7%a3encodeuricomponent%e6%98%af%e5%85%a8%e7%90%83%e6%a0%87%e5%87%86%e7%9a%84%e6%95%85%e4%ba%8b%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%9b%be%e7%bb%8f%e8%af%af%e8%a7%a3encodeuricomponent%e6%98%af%e5%85%a8%e7%90%83%e6%a0%87%e5%87%86%e7%9a%84%e6%95%85%e4%ba%8b%e3%80%82\/\",\"name\":\"\u6211\u66fe\u7ecf\u8bef\u89e3encodeURIComponent\u662f\u5168\u7403\u6807\u51c6\u7684\u6545\u4e8b - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-02-09T15:40:24+00:00\",\"dateModified\":\"2024-04-29T02:14:42+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/cb5556d2501da73d864cac945e8d9461\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%9b%be%e7%bb%8f%e8%af%af%e8%a7%a3encodeuricomponent%e6%98%af%e5%85%a8%e7%90%83%e6%a0%87%e5%87%86%e7%9a%84%e6%95%85%e4%ba%8b%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%9b%be%e7%bb%8f%e8%af%af%e8%a7%a3encodeuricomponent%e6%98%af%e5%85%a8%e7%90%83%e6%a0%87%e5%87%86%e7%9a%84%e6%95%85%e4%ba%8b%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%9b%be%e7%bb%8f%e8%af%af%e8%a7%a3encodeuricomponent%e6%98%af%e5%85%a8%e7%90%83%e6%a0%87%e5%87%86%e7%9a%84%e6%95%85%e4%ba%8b%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6211\u66fe\u7ecf\u8bef\u89e3encodeURIComponent\u662f\u5168\u7403\u6807\u51c6\u7684\u6545\u4e8b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/cb5556d2501da73d864cac945e8d9461\",\"name\":\"\u6e05, \u626c\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/32a4239de8ff29adace466261d309424a1e5fe9f7e3036bf89fe03f2e3dbe717?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/32a4239de8ff29adace466261d309424a1e5fe9f7e3036bf89fe03f2e3dbe717?s=96&d=mm&r=g\",\"caption\":\"\u6e05, \u626c\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyang\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%9b%be%e7%bb%8f%e8%af%af%e8%a7%a3encodeuricomponent%e6%98%af%e5%85%a8%e7%90%83%e6%a0%87%e5%87%86%e7%9a%84%e6%95%85%e4%ba%8b%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u6211\u66fe\u7ecf\u8bef\u89e3encodeURIComponent\u662f\u5168\u7403\u6807\u51c6\u7684\u6545\u4e8b - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u6211\u66fe\u7ecf\u8bef\u89e3encodeuricomponent\u662f\u5168\u7403\u6807\u51c6\u7684\u6545\u4e8b\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u6211\u66fe\u7ecf\u8bef\u89e3encodeURIComponent\u662f\u5168\u7403\u6807\u51c6\u7684\u6545\u4e8b","og_description":"\u6211\u6b63\u5728\u64cd\u7eb5\u4e00\u4e2a\u7528\u4e8e\u4fee\u6539URL\u7684\u7a0b\u5e8f\uff0c\u7531\u4e8e\u89c4\u8303\u4e0d\u660e\u786e\u800c\u611f\u5230\u56f0\u60d1\uff0c\u6240\u4ee5\u6211\u5c06\u603b\u7ed3\u4e00\u4e0b\u3002 2\/23: \u6dfb\u52a0\u8ffd\u8bd5\u90e8\u5206\u6ce8\u91ca [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u6211\u66fe\u7ecf\u8bef\u89e3encodeuricomponent\u662f\u5168\u7403\u6807\u51c6\u7684\u6545\u4e8b\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-02-09T15:40:24+00:00","article_modified_time":"2024-04-29T02:14:42+00:00","author":"\u6e05, \u626c","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u626c","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%9b%be%e7%bb%8f%e8%af%af%e8%a7%a3encodeuricomponent%e6%98%af%e5%85%a8%e7%90%83%e6%a0%87%e5%87%86%e7%9a%84%e6%95%85%e4%ba%8b%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%9b%be%e7%bb%8f%e8%af%af%e8%a7%a3encodeuricomponent%e6%98%af%e5%85%a8%e7%90%83%e6%a0%87%e5%87%86%e7%9a%84%e6%95%85%e4%ba%8b%e3%80%82\/","name":"\u6211\u66fe\u7ecf\u8bef\u89e3encodeURIComponent\u662f\u5168\u7403\u6807\u51c6\u7684\u6545\u4e8b - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-02-09T15:40:24+00:00","dateModified":"2024-04-29T02:14:42+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/cb5556d2501da73d864cac945e8d9461"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%9b%be%e7%bb%8f%e8%af%af%e8%a7%a3encodeuricomponent%e6%98%af%e5%85%a8%e7%90%83%e6%a0%87%e5%87%86%e7%9a%84%e6%95%85%e4%ba%8b%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%9b%be%e7%bb%8f%e8%af%af%e8%a7%a3encodeuricomponent%e6%98%af%e5%85%a8%e7%90%83%e6%a0%87%e5%87%86%e7%9a%84%e6%95%85%e4%ba%8b%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%9b%be%e7%bb%8f%e8%af%af%e8%a7%a3encodeuricomponent%e6%98%af%e5%85%a8%e7%90%83%e6%a0%87%e5%87%86%e7%9a%84%e6%95%85%e4%ba%8b%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u6211\u66fe\u7ecf\u8bef\u89e3encodeURIComponent\u662f\u5168\u7403\u6807\u51c6\u7684\u6545\u4e8b"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/cb5556d2501da73d864cac945e8d9461","name":"\u6e05, \u626c","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/32a4239de8ff29adace466261d309424a1e5fe9f7e3036bf89fe03f2e3dbe717?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/32a4239de8ff29adace466261d309424a1e5fe9f7e3036bf89fe03f2e3dbe717?s=96&d=mm&r=g","caption":"\u6e05, \u626c"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyang\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%9b%be%e7%bb%8f%e8%af%af%e8%a7%a3encodeuricomponent%e6%98%af%e5%85%a8%e7%90%83%e6%a0%87%e5%87%86%e7%9a%84%e6%95%85%e4%ba%8b%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/44571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=44571"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/44571\/revisions"}],"predecessor-version":[{"id":84661,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/44571\/revisions\/84661"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=44571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=44571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=44571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}