eeue56 / eeue56/elm-static-html
Content of text nodes is not escaped
- Dominant language
- JavaScript
- Stars
- 89
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
When writing normal Elm, one does not have to do much escaping to avoid xss since, for example, `Html.text` just creates a text node, which cannot be interpreted as containing any tags.
When converting to html though, this library should ideally escape the contents of text nodes, so a view like
``` Elm
view : Html msg
view =
Html.text "//do evil stuff"
```
does not generate malicious html files.
I realize this project may be superceded by a native Elm workflow in 0.19, but until then I feel this is still a security concern.
Contributor guide
No contributing guide indexed for this repository
Research direction
The reported entry point is Elm.text during conversion to HTML; start by reproducing the supplied view and tracing where its text content is serialized. Done means the generated HTML escapes the script-like text so it remains a text node, with no tags interpreted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elm, javascript
- Domain
- security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100