본문 바로가기

[IT/Programming]/HTML related

HTML id 에 한글이나 encodeURIComponent, %, \s, [, ], !, @, #, $, %, ^, &, *, (, ), -, _, +, =, \, /, ?, ~, :, ;, ", ', <, >, ,, . 등 특수문자 (special characters) 들어갈 수 있는지 테스트 해보기

728x90
반응형
# HTML id 에 한글이나 encodeURIComponent, %, \s, [, ], !, @, #, $, %, ^, &, *, (, ), -, _, +, =, \, /, ?, ~, :, ;, ", ', <, >, ,, . 등 특수문자 (special characters) 들어갈 수 있는지 테스트 해보기 ## PH
  • 2023-10-29 : First posting. (No double enter is allowed in codeprint>script.)
## TOC ## 한글 id test
Id which starts with 한글.
Id which starts with English+한글
Id which starts with English+한글
Id which starts with English+한글1
Id which starts with English+한글1
```[.linenums.lang-html] <div id="한글">Id which starts with 한글.</div> <div id="id-한글">Id which starts with English+한글</div> <div id="id+한글">Id which starts with English+한글</div> <div id="id+한글1">Id which starts with English+한글1</div> <div id="id+한글2">Id which starts with English+한글1</div> ```/ ```[#pre-code-hangul.linenums.lang-html] ```/ ## % id test (encodeURIComponent)
id="%ED%95%9C%EA%B8%80" which is encodeURIComponent("한글")
id="id-%ED%95%9C%EA%B8%80" which is encodeURIComponent("한글")
id="id-%ED%95%9C%EA%B8%801" which is encodeURIComponent("한글1")
id="id-\%ED\%95\%9C\%EA\%B8\%80" which is encodeURIComponent("한글") with escaped \%
id="id-\\%ED\\%95\\%9C\\%EA\\%B8\\%80" which is encodeURIComponent("한글") with escaped \\%
id="id-:ED:95:9C:EA:B8:80" which is encodeURIComponent("한글") with escaped % to :
id="id-:ED:95:9C:EA:B8:801" which is encodeURIComponent("한글") with escaped % to :
id="id-:ED:95:9C:EA:B8:802" which is encodeURIComponent("한글") with escaped % to :
id="id-_ED_95_9C_EA_B8_80" which is encodeURIComponent("한글") with escaped % to _
id="id__ED_95_9C_EA_B8_80" which is encodeURIComponent("한글") with escaped % to _
id="id__ED"
```[.linenums.lang-html] <div id="%ED%95%9C%EA%B8%80">id="%ED%95%9C%EA%B8%80" which is encodeURIComponent("한글")</div> <div id="id-%ED%95%9C%EA%B8%80">id="id-%ED%95%9C%EA%B8%80" which is encodeURIComponent("한글")</div> <div id="id-%ED%95%9C%EA%B8%801">id="id-%ED%95%9C%EA%B8%801" which is encodeURIComponent("한글1")</div> <div id="id-\%ED\%95\%9C\%EA\%B8\%80">id="id-\%ED\%95\%9C\%EA\%B8\%80" which is encodeURIComponent("한글") with escaped \%</div> <div id="id-\\%ED\\%95\\%9C\\%EA\\%B8\\%80">id="id-\\%ED\\%95\\%9C\\%EA\\%B8\\%80" which is encodeURIComponent("한글") with escaped \\%</div> <div id="id-:ED:95:9C:EA:B8:80">id="id-:ED:95:9C:EA:B8:80" which is encodeURIComponent("한글") with escaped % to :</div> <div id="id-:ED:95:9C:EA:B8:801">id="id-:ED:95:9C:EA:B8:801" which is encodeURIComponent("한글") with escaped % to :</div> <div id="id-:ED:95:9C:EA:B8:802">id="id-:ED:95:9C:EA:B8:802" which is encodeURIComponent("한글") with escaped % to :</div> <div id="id-_ED_95_9C_EA_B8_80">id="id-_ED_95_9C_EA_B8_80" which is encodeURIComponent("한글") with escaped % to _</div> <div id="id__ED_95_9C_EA_B8_80">id="id__ED_95_9C_EA_B8_80" which is encodeURIComponent("한글") with escaped % to _</div> <div id="id__ED">id="id__ED"</div> ```/ ```[#pre-code-encode.linenums.lang-html] ```/ ## HTML element id 한글과 특수문자들로 가지고 놀기.
```[.linenums.lang-html] <div id="container-id-test"></div> <div id="id-test-result"></div> <div id="id-test-result1"></div> ```/ ```[#pre-code-id-test.linenums.lang-html] ```/ ## RRA
  1. kipid's blog :: Encode/Unescape and Decode/Escape URI Component
728x90
반응형