An open API service indexing awesome lists of open source software.

https://github.com/strawmelonjuice/odysseus

UN-escaping HTML
https://github.com/strawmelonjuice/odysseus

Last synced: 3 months ago
JSON representation

UN-escaping HTML

Awesome Lists containing this project

README

          

# odysseus

[![Package Version](https://img.shields.io/hexpm/v/odysseus)](https://hex.pm/packages/odysseus)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/odysseus/)

[Houdini](https://hexdocs.pm/houdini/) was a master of escaping, odysseus bound himself to his ship to
survive the sirens... thereby being a master of _unescaping_, I guess.

```sh
gleam add odysseus@1
```

```gleam
import odysseus
import houdini

pub fn main() -> Nil {
// Escaped String
let escaped_string = houdini.escape("

My milkshake brings all the boys to the yard...

")
// Escaped Sting
let escaped_sting = houdini.escape("I don't drink coffee, I'll take tea my dear
I like my toast done on one side
And you can hear it in my accent when I talk
I'm an Englishman in New York")

// Now, time to unescape them to get the originals!
let unescaped_string = odysseus.unescape(escaped_string)
let caught_sting = odysseus.unescape(escaped_sting)
}
```

Further documentation can be found at .

## Development

```sh
gleam run # Run the project
gleam test # Run the tests
```