4 ms·
Doesn't seem like valid JS, you wouldn't need mark.js if that were the case.
by hepta 9y ago
Doesn't seem like valid JS, you wouldn't need mark.js if that were the case.
- afandian 9y agoYes you would. JSON is valid JS, and executing JSON in a browser is a recipe for disaster.
- minitech 9y agoJSON isn’t valid JS – its representation of strings allows U+2028 and U+2029 to appear unescaped, but JavaScript string literals don’t. Not sure how else executing (valid) JSON in a browser would be a recipe for disaster? `eval` was the standard way to parse JSON from trusted sources for a long time.