NAME

Dancer2::Plugin::UnicodeNormalize - Normalize incoming Unicode parameters

VERSION

Version 0.032

SYNOPSIS

use Dancer2::Plugin::UnicodeNormalize;

DESCRIPTION

Dancer2::Plugin::UnicodeNormalize normalizes all incoming parameters to a given normalization form. This is achieved with a before hook, which should run silently before processing each route. By default, we use Unicode Normalization Form C - this is usually what you want. Other forms can be selected, see: "CONFIGURATION".

This plugin was inspired by Mojolicious::Plugin::UnicodeNormalize. For information on why Unicode Normalization is important, please see:

http://www.perl.com/pub/2012/05/perlunicookbook-unicode-normalization.html

http://www.modernperlbooks.com/mt/2013/11/mojolicious-unicode-normalization-plugin-released.html

CONFIGURATION

plugins:
    UnicodeNormalize:
        form: NFC
        exclude:
            - '^/(css|javascripts|images)'

The form parameter is described in Unicode::Normalize. Default is NFC.

The exclude parameter consists of a list of regular expressions to match routes we do not wish to process parameters for.

AUTHOR

John Barrett, <john@jbrt.org>

CONTRIBUTING

http://github.com/jbarrett/Dancer2-Plugin-UnicodeNormalize

All comments and contributions welcome.

BUGS AND SUPPORT

Please direct all requests to http://github.com/jbarrett/Dancer2-Plugin-UnicodeNormalize/issues or email <john@jbrt.org>.

COPYRIGHT

Copyright 2013 John Barrett.

LICENSE

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

SEE ALSO

Dancer2

Unicode::Normalize

Mojolicious::Plugin::UnicodeNormalize