Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

html::mason::escapes(3pm) [debian man page]

HTML::Mason::Escapes(3pm)				User Contributed Perl Documentation				 HTML::Mason::Escapes(3pm)

NAME
HTML::Mason::Escapes - Functions to escape text for Mason DESCRIPTION
This module contains functions for implementing Mason's substitution escaping feature. These functions may also be called directly. html_entities_escape This function takes a scalar reference and HTML-escapes it using the "HTML::Entities" module. By default, this module assumes that the string it is escaping is in ISO-8859-1 (pre Perl 5.8.0) or UTF-8 (Perl 5.8.0 onwards). If this is not the case for your data, you will want to override this escape to do the right thing for your encoding. See the section on User-defined Escapes in the Developer's Manual for more details on how to do this. url_escape This takes a scalar reference and replaces any text it contains matching "[^a-zA-Z0-9_.-]" with the URL-escaped equivalent, a percent sign (%) followed by the hexadecimal number of that character. basic_html_escape This function takes a scalar reference and HTML-escapes it, escaping the following characters: '&', '>', '<', and '"'. It is provided for those who wish to use it to replace (or supplement) the existing 'h' escape flag, via the Interpreter's "set_escape()" method. This function is provided in order to allow people to return the HTML escaping behavior in 1.0x. However, this behavior presents a potential security risk of allowing cross-site scripting attacks. HTML escaping should always be done based on the character set a page is in. Merely escaping the four characters mentioned above is not sufficient. The quick summary of why is that for some character sets, characters other than '<' may be interpreted as a "less than" sign, meaning that just filtering '<' and '>' will not stop all cross-site scripting attacks. See http://www.megasecurity.org/Info/cross-site_scripting.txt for more details. perl v5.14.2 2012-02-04 HTML::Mason::Escapes(3pm)

Check Out this Related Man Page

HTML::Mason::MethodMaker(3pm)				User Contributed Perl Documentation			     HTML::Mason::MethodMaker(3pm)

NAME
HTML::Mason::MethodMaker - Used to create simple get & get/set methods in other classes SYNOPSIS
use HTML::Mason::MethodMaker ( read_only => 'foo', read_write => [ [ bar => { type => SCALAR } ], [ baz => { isa => 'HTML::Mason::Baz' } ], 'quux', # no validation ], read_write_contained => { other_object => [ [ 'thing1' => { isa => 'Thing1' } ], 'thing2', # no validation ] }, ); DESCRIPTION
This automates the creation of simple accessor methods. USAGE
This module creates methods when it is "use"'d by another module. There are three types of methods: 'read_only', 'read_write', 'read_write_contained'. Attributes specified as 'read_only' get an accessor that only returns the value of the attribute. Presumably, these attributes are set via more complicated methods in the class or as a side effect of one of its methods. Attributes specified as 'read_write' will take a single optional parameter. If given, this parameter will become the new value of the attribute. This value is then returned from the method. If no parameter is given, then the current value is returned. If you want the accessor to use "Params::Validate" to validate any values passed to the accessor (and you _do_), then the the accessor specification should be an array reference containing two elements. The first element is the accessor name and the second is the validation spec. The 'read_write_contained' parameter is used to create accessor for delayed contained objects. A delayed contained object is one that is not created in the containing object's accessor, but rather at some point after the containing object is constructed. For example, the Interpreter object creates Request objects after the Interpreter itself has been created. The value of the 'read_write_contained' parameter should be a hash reference. The keys are the internal name of the contained object, such as "request" or "compiler". The values for the keys are the same as the parameters given for 'read_write' accessors. SEE ALSO
HTML::Mason perl v5.14.2 2012-02-04 HTML::Mason::MethodMaker(3pm)
Man Page