NAME

Valiant::Util - Importable utility methods;

SYNOPSIS

use Valiant::JSON::Util 'escape_javascript';

DESCRIPTION

Just a place to stick various utility functions that are cross cutting concerns.

SUBROUTINES

This package has the following subroutines for EXPORT

escape_javascript

escape_javascript($string);

Escapes a string so it can be used in a javascript string. This is a wrapper around The same method from "escape_javascript" in Valiant::HTML::Util::TagBuilder.

Basically this escapes ' and " and \ and newlines and a few other neaten up so that you can use a string as a javascript value. Helps with injection attackes (but isn't everything you need). =head1 SEE ALSO

Valiant

AUTHOR

See Valiant

COPYRIGHT & LICENSE

See Valiant