NAME

Konstrukt::Plugin::uriencode - URI-encode the text

SYNOPSIS

Usage:

<& uriencode &>Some Text<& / &>
<& uriencode encode="all" &>Some Text<& / &>

Result:

Some%20Text
%53%6F%6D%65%20%54%65%78%74

DESCRIPTION

This plugin will convert some special characters in the text to produce a valid URI-value.

If the attribute encode="all" is passed, every character will be encoded.

METHODS

prepare

As the output of this plugin will not vary with each call with the same input, all work can be done in the prepare step if there is no dynamic content inside the content of this tag.

Parameters:

  • $tag - Reference to the tag (and its children) that shall be handled.

execute

Now there can only be static content below this tag. We can finally modify and return it.

Parameters:

  • $tag - Reference to the tag (and its children) that shall be handled.

process

As prepare and execute are almost the same each run will just call this method.

Parameters:

  • $tag - Reference to the tag (and its children) that shall be handled.

  • $execute - Should be a true value, when we're in the execute-run

AUTHOR

Copyright 2006 Thomas Wittek (mail at gedankenkonstrukt dot de). All rights reserved.

This document is free software. It is distributed under the same terms as Perl itself.

SEE ALSO

Konstrukt::Plugin, Konstrukt