お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Closes | エスケープする文字を含む文字列 |
e | 使用するテキスト エンコード |
文字列の文字をエスケープし、URL に親和性があることを保証します。
特定のテキスト文字は URL で表現するときに特殊記号として扱われてます。もしそれらの文字を URL パラメータの中に含める場合、エスケープ シーケンスを用いて表現する必要があります。ユーザから提供された全てのテキストについて、URL パラメータにテキストを渡す前に、この関数を使用することを推奨します。これにより悪意のあるユーザが URL のコンテンツを操作してウェブサーバを攻撃することを防止します。
function Start () { // Escaped name is "Fish+%26+Chips'. var escName = WWW.EscapeURL('Fish & Chips'); }
using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { void Start() { string escName = WWW.EscapeURL("Fish & Chips"); } }
import UnityEngine import System.Collections public class ExampleClass(MonoBehaviour): def Start() as void: escName as string = WWW.EscapeURL('Fish & Chips')
See Also: UnEscapeURL.