---
name: "Poet::Util::Web"
section: "3pm"
platform: "linux"
package: "libpoet-perl"
version: "0.16-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Poet::Util::Web"
---

# Poet::Util::Web(3pm)

Web-related utilities

## NAME

Poet::Util::Web - Web-related utilities

## SYNOPSIS

```
    # In a script...
    use Poet::Script qw(:web);
    # In a module...
    use Poet qw(:web);
    # Automatically available in Mason components
```

## DESCRIPTION

This group of utilities includes

- html\_escape ($str)

  Return *$str* with HTML entities escaped/unescaped.

- uri\_escape ($str), uri\_unescape ($str)

  Return *$str* URI escaped/unescaped, from URI::Escape

- js\_escape ($str)

  Return *$str* escaped for Javascript, borrowed from JavaScript::Value::Escape.

- make\_uri ($path, $args)

  Create a URL by combining *$path* with a query string formed from hashref *$args*. e.g.

  ```
      make_uri("/foo/bar", { a => 5, b => 6 });
          ==> /foo/bar?a=5&b=6
  ```

## SEE ALSO

Poet

## AUTHOR

Jonathan Swartz \<swartz@pobox.com\>

## COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Jonathan Swartz.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
