Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ DefaultUrlEncoder()

System.Text.Encodings.Web.DefaultUrlEncoder.DefaultUrlEncoder ( TextEncoderSettings settings)
inlinepackage

Definition at line 101 of file DefaultUrlEncoder.cs.

102 {
103 if (settings == null)
104 {
105 throw new ArgumentNullException("settings");
106 }
107 ScalarEscaperBase singleton = EscaperImplementation.Singleton;
108 ref readonly AllowedBmpCodePointsBitmap allowedCodePointsBitmap = ref settings.GetAllowedCodePointsBitmap();
109 Span<char> span = stackalloc char[31]
110 {
111 ' ', '#', '%', '/', ':', '=', '?', '[', '\\', ']',
112 '^', '`', '{', '|', '}', '\ufff0', '\ufff1', '\ufff2', '\ufff3', '\ufff4',
113 '\ufff5', '\ufff6', '\ufff7', '\ufff8', '\ufff9', '\ufffa', '\ufffb', '', '\ufffd', '\ufffe',
114 '\uffff'
115 };
116 _innerEncoder = new OptimizedInboxTextEncoder(singleton, in allowedCodePointsBitmap, forbidHtmlSensitiveCharacters: true, span);
117 }
readonly OptimizedInboxTextEncoder _innerEncoder

References System.Text.Encodings.Web.DefaultUrlEncoder._innerEncoder, System.Text.Encodings.Web.TextEncoderSettings.GetAllowedCodePointsBitmap(), and System.Text.Encodings.Web.DefaultUrlEncoder.EscaperImplementation.Singleton.