I'm writing code that automatically generates HTML, and I want it to encode things properly.앰퍼샌드를 <a href...>?
Say I'm generating a link to the following URL:
http://www.google.com/search?rls=en&q=stack+overflow
I'm assuming that all attribute values should be HTML-encoded. (Please correct me if I'm wrong.) So that means if I'm putting the above URL into an anchor tag, I should encode the ampersand as &
, like this:
<a href="http://www.google.com/search?rls=en&q=stack+overflow">
Is that correct?
[URL을 무효로 만드는 문자는 무엇입니까?] (http://stackoverflow.com/questions/1547899/which-characters-make-a-url-invalid) –
@CiroSantilli : 실제 URL 문자열에 관한 내용입니다. 이것은 HTML 속성에 나타날 때 인코딩되는 방법에 관한 것입니다. –