I want to understand why some extensions use escaping for <all_urls>
angle brackets, whereas another extensions don't.
Some manifests don't use escaping at all, some use escaping for opening angle bracket, and some for both. Examples:
"permissions": [
"<all_urls>"
]
"permissions": [
"\u003Call_urls>"
]
and even
"permissions": [
"\u003Call\u005Furls\u003E"
]
What's the purpose behind these replacements and should / should not I escape it?
Update. As live examples, here are few extensions offered by Google, which are using escaping: Share to Classroom, Google Dictionary and High Contrast. There are probably more. These 3 is just a result of my own brief research.
Also, here is assumption that escaping is for validation (link):
Although the manifest.json should be Unicode-encoded, I've seen a lot of extensions escaping the
<
,_
and>
, to their's equivalent Unicode-format of"\u003Call\u005Furls\u003E"
. I've asked around, and apparently some developers have used validation mechanism, which then validated the JSON "invalid" because of those characters.
But, Google extensions which I gave as live examples, escapes only opening angle bracket, that is:
\u003Call_urls>
That's why, from my point of view, the quote above doesn't actually answer the question.