google / google/jsonnet

manifestXmlJsonml does not escape content, nor is there an escape for html/xml

Open
#1,037 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Jsonnet
Stars
7.6k
Forks
475
PR merge metrics
No merged PRs in 30d

Description

How does one properly escape user inputs / data for insertion into contents of a tag?

```bash
[scr@R9459YDHVQ]$ jsonnet -S -e 'function(vars) std.manifestXmlJsonml(["statement", vars.statement])' --tla-code vars='{"statement": "5 < 4"}'
5 < 4
```

(Yes the statement is false 😄 , as is the output - it _should_ be `5 < 4`)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.