HttpUtility.HtmlAttributeEncode 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
문자열을 HTML로 인코딩된 문자열로 최소로 변환합니다.
오버로드
| Name | Description |
|---|---|
| HtmlAttributeEncode(String) |
문자열을 HTML로 인코딩된 문자열로 최소로 변환합니다. |
| HtmlAttributeEncode(String, TextWriter) |
최소한 문자열을 HTML로 인코딩된 문자열로 변환하고 인코딩된 문자열을 출력 스트림으로 TextWriter 보냅니다. |
HtmlAttributeEncode(String)
- Source:
- HttpUtility.cs
- Source:
- HttpUtility.cs
- Source:
- HttpUtility.cs
- Source:
- HttpUtility.cs
- Source:
- HttpUtility.cs
문자열을 HTML로 인코딩된 문자열로 최소로 변환합니다.
public:
static System::String ^ HtmlAttributeEncode(System::String ^ s);
public static string? HtmlAttributeEncode(string? s);
public static string HtmlAttributeEncode(string s);
static member HtmlAttributeEncode : string -> string
Public Shared Function HtmlAttributeEncode (s As String) As String
매개 변수
- s
- String
인코딩할 문자열입니다.
반품
인코딩된 문자열입니다.
설명
이 메서드는 HtmlAttributeEncode HTML 특성 값에 삽입하는 데 적합한 문자를 인코딩합니다.
메서드의 HtmlAttributeEncode 문자열 결과는 큰따옴표가 붙은 특성에만 사용해야 합니다. 단일 따옴표로 묶인 특성이 있는 메서드를 HtmlAttributeEncode 사용할 때 보안 문제가 발생할 수 있습니다.
추가 정보
적용 대상
HtmlAttributeEncode(String, TextWriter)
- Source:
- HttpUtility.cs
- Source:
- HttpUtility.cs
- Source:
- HttpUtility.cs
- Source:
- HttpUtility.cs
- Source:
- HttpUtility.cs
최소한 문자열을 HTML로 인코딩된 문자열로 변환하고 인코딩된 문자열을 출력 스트림으로 TextWriter 보냅니다.
public:
static void HtmlAttributeEncode(System::String ^ s, System::IO::TextWriter ^ output);
public static void HtmlAttributeEncode(string? s, System.IO.TextWriter output);
public static void HtmlAttributeEncode(string s, System.IO.TextWriter output);
static member HtmlAttributeEncode : string * System.IO.TextWriter -> unit
Public Shared Sub HtmlAttributeEncode (s As String, output As TextWriter)
매개 변수
- s
- String
인코딩할 문자열입니다.
- output
- TextWriter
출력 스트림입니다 TextWriter .
설명
이 메서드는 HtmlAttributeEncode 큰따옴표("), 작은따옴표('), 앰퍼샌드(&), 왼쪽 꺾쇠 괄호(<)만 해당 문자 엔터티로 변환합니다. 메서드보다 HtmlEncode 훨씬 빠릅니다.
메서드의 HtmlAttributeEncode 문자열 결과는 큰따옴표가 붙은 특성에만 사용해야 합니다. 단일 따옴표로 묶인 특성이 있는 메서드를 HtmlAttributeEncode 사용할 때 보안 문제가 발생할 수 있습니다.