サルヴェテ!私は、URLエンコードの特定の方法がリンクを壊すことを発見しました。レコードの場合、%2f
スラッシュ文字を表します。/
さて、これを考えてみましょう:元のリンク:http://dottech.org/95285/this-is-the-pacific-barreleye-a-fish-with-a-transparent-head-amazing-photo-of-the-day
javascript(encodeURIComponent
)urlencodedリンク:http://dottech.org%2f95285%2fthis-is-the-pacific-barreleye-a-fish-with-a-transparent-head-amazing-photo-of-the-day
これで、エンコードされたリンクをブラウザのアドレスバーに貼り付けると、壊れます(Firefox、Chrome、IE)。
ただし、最初のスラッシュをurlエンコードしない場合は、完全に機能します。http://dottech.org/95285%2fthis-is-the-pacific-barreleye-a-fish-with-a-transparent-head-amazing-photo-of-the-day
なんで?