объясни почему google даёт именно `&` а не `&` ???
Google provides the raw URL with `&` because that's the correct URL syntax for query parameters! The `&` is meant to be used directly in URLs and API calls.
The `&` encoding is only needed when embedding URLs within HTML attributes. This is because HTML parsers need to distinguish between `&` as part of URL query parameters and `&` as part of HTML entities.
When you copy a URL from the browser or get it from an API, it will show the raw `&` character. The encoding to `&` is specifically an HTML markup requirement, not a URL requirement.
That's why Google Fonts and other services provide URLs with regular `&` characters - they're giving you the actual URL, and it's up to you to properly encode it when embedding in HTML.
Комментариев нет:
Отправить комментарий