Skip to content

Commit

Permalink
Merge pull request #6 from Hasnep/remove-unused-self-module-names
Browse files Browse the repository at this point in the history
Remove references to the Html interface inside itself
  • Loading branch information
Hasnep authored Feb 2, 2024
2 parents 081db01 + 4d38c67 commit a4dded2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Html.roc
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ text : Str -> Node
text = Text

expect
textNode = Html.text "<script>alert('hi')</script>"
Html.renderWithoutDocType textNode == "&lt;script&gt;alert(&#39;hi&#39;)&lt;/script&gt;"
textNode = text "<script>alert('hi')</script>"
renderWithoutDocType textNode == "&lt;script&gt;alert(&#39;hi&#39;)&lt;/script&gt;"

## Mark a string as safe for HTML without actually escaping it.
##
Expand All @@ -171,8 +171,8 @@ dangerouslyIncludeUnescapedHtml : Str -> Node
dangerouslyIncludeUnescapedHtml = UnescapedHtml

expect
htmlNode = Html.dangerouslyIncludeUnescapedHtml "<script>alert('This JavaScript will run')</script>"
Html.renderWithoutDocType htmlNode == "<script>alert('This JavaScript will run')</script>"
htmlNode = dangerouslyIncludeUnescapedHtml "<script>alert('This JavaScript will run')</script>"
renderWithoutDocType htmlNode == "<script>alert('This JavaScript will run')</script>"

## Define a non-standard HTML Element.
## You can use this to add elements that are not already supported.
Expand Down

0 comments on commit a4dded2

Please sign in to comment.