4 ms·
Are single-quotes allowed in the spec? There is an explicit call out for "double quote == bad", but single quotes are also valid property delimeters in HTML.
by web007 10y ago
Are single-quotes allowed in the spec?
There is an explicit call out for "double quote == bad", but single quotes are also valid property delimeters in HTML.
- majewsky 10y agoIf your property string is enclosed in a double quote, then a single quote in the payload is fine. (Otherwise, a lot of inline JS in onclick etc. attributes would break. JS allows both types of quotes on string literals for exactly this reason.) Still, single quotes are somewhat asking for trouble.
- kevinAlbs 10y agoBase-122 encoded strings may contain single quotes but not double quotes. The choice between the two was arbitrary.