內容簡介
使用 [選項]-[永久連結]-[通用選項]-[以日期和名稱為基礎] 或自訂 URL 中的 %postname%,條目標題將被規範化以符合 URL 允許的字母。如果標題具有非 ASCII 字母,這些字母不能直接放入 URL 中,因此它們被百分比編碼。這是在 sanitize_title_with_dashes_original() 和 utf8_uri_encode()中進行處理。
大寫字母在百分比編碼中所需的原因在 RFC3986 第 2.1 節中描述,
大寫十六進位數字 ‘A’ 到 ‘F’ 分別等同於小寫數字 ‘a’ 到 ‘f’ 的數字。如果兩個 URI 唯一不同之處在於百分比編碼八位組中使用的十六進位數字的大小寫,則它們是等效的。
為了保持一致性,URI 生產者和正規化器應使用大寫十六進位數字進行所有百分比編碼。正如您所看到的 RFC2119 第 3 節,“應該”意味著您可以出於有效的原因忽略它。
此外掛會使用大寫字母進行百分比編碼,使 URL 變得正常。
外掛標籤
開發者團隊
② 後台搜尋「percent encode capital letter」→ 直接安裝(推薦)
原文外掛簡介
When you use [Options]-[Permalinks]-[Common Options]-[Date and name based], or %postname% in custom URL, entry title will be normalized for fitting to URL permitted letters. If title has non-ASCII letters, those letters cannot be directly put in URL so they are percent-encoded. This is processed in sanitize_title_with_dashes_original() and utf8_uri_encode() .
The reason capital letters in percent encoding required is described on RFC3986 section 2.1,
The uppercase hexadecimal digits ‘A’ through ‘F’ are equivalent to the lowercase digits ‘a’ through ‘f’, respectively. If two URIs differ only in the case of hexadecimal digits used in percent-encoded octets, they are equivalent.
For consistency, URI producers and normalizers should use uppercase hexadecimal digits for all percent-encodings. As you see RFC2119 section 3, “should” means you may ignore it with valid reason.
This plugin makes regular URL by which percent encoding was carried out with a capital letter.
