←back to thread

69 points jdkoeck | 2 comments | | HN request time: 0s | source
1. dvh ◴[] No.44437459[source]
It should be secure by default, no more .innerHTML = user_name and gluing strings together like with SQL in the '90s
replies(1): >>44437616 #
2. jfagnani ◴[] No.44437616[source]
This API is definitely secure by default, and that's one of the constraints and requirements I mention in the post.

The API is secure because it separates static developer controlled strings from dynamic and possibly user-controlled values by JavaScript syntax. Values from text bindings are written to the DOM by setting TextNode.data, which escapes the value first.