.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. | will give a
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
.\" expand to `' in nroff, nothing in troff, for use with C<>.
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.\"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "Data 3"
.TH Data 3 "2002-07-03" "perl v5.8.8" "User Contributed Perl Documentation"
.SH "NAME"
Slash::MODULE \- SHORT DESCRIPTION for Slash
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 2
\& use Slash::Utility;
\& # do not use this module directly
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
\&\s-1LONG\s0 \s-1DESCRIPTION\s0.
.SH "EXPORTED FUNCTIONS"
.IX Header "EXPORTED FUNCTIONS"
.Sh "\fIroot2abs()\fP"
.IX Subsection "root2abs()"
Convert \f(CW\*(C`rootdir\*(C'\fR to its absolute equivalent. By default, \f(CW\*(C`rootdir\*(C'\fR is
protocol-inspecific (such as \*(L"//www.example.com\*(R") and for redirects needs
to be converted to its absolute form. There is an \f(CW\*(C`absolutedir\*(C'\fR var, but
it is protocol\-specific, and we want to inherit the protocol. So if
\&\f(CW$ENV{HTTPS}\fR is true, we use \s-1HTTPS\s0, else we use \s-1HTTP\s0.
.IP "Return value" 4
.IX Item "Return value"
rootdir variable, converted to absolute with proper protocol.
.Sh "url2abs(\s-1URL\s0)"
.IX Subsection "url2abs(URL)"
Take \s-1URL\s0 and make it absolute. It takes a \s-1URL\s0,
and adds rootdir to the beginning if necessary, and
adds the protocol to the beginning if necessary, and
then uses \s-1URI\-\s0>\fInew_abs()\fR to get the correct string.
.IP "Parameters" 4
.IX Item "Parameters"
.RS 4
.PD 0
.IP "\s-1URL\s0" 4
.IX Item "URL"
.PD
\&\s-1URL\s0 to make absolute.
.RE
.RS 4
.RE
.IP "Return value" 4
.IX Item "Return value"
Fixed \s-1URL\s0.
.Sh "formatDate(\s-1DATA\s0 [, \s-1COLUMN\s0, \s-1AS\s0, \s-1FORMAT\s0])"
.IX Subsection "formatDate(DATA [, COLUMN, AS, FORMAT])"
Converts dates from the database; takes an arrayref of rows.
.PP
This example would take the 1th element of each arrayref in \f(CW$data\fR, format it,
and put the result in the 2th element.
.PP
.Vb 1
\& formatDate($data, 1, 2);
.Ve
.PP
This example would take the \*(L"foo\*(R" key of each hashref in \f(CW$data\fR, format it,
and put the result in the \*(L"bar\*(R" key.
.PP
.Vb 1
\& formatDate($data, 'foo', 'bar');
.Ve
.PP
The \f(CW\*(C`timeCalc\*(C'\fR function does the formatting.
.IP "Parameters" 4
.IX Item "Parameters"
.RS 4
.PD 0
.IP "\s-1DATA\s0" 4
.IX Item "DATA"
.PD
Data is either an arrayref of arrayrefs, or an arrayref of hashrefs.
Which it is will be determined by whether \s-1COLUMN\s0 is numeric or not. If
it is numeric, then \s-1DATA\s0 will be assumed to be an arrayref of arrayrefs.
.IP "\s-1COLUMN\s0" 4
.IX Item "COLUMN"
The column to take the data from, to be translated. If numeric, then
\&\s-1DATA\s0 will be taken to be an arrayref of arrayrefs. Otherwise, the value
will be the hashref key. Default value is \*(L"date\*(R".
.IP "\s-1AS\s0" 4
.IX Item "AS"
The column where to put the newly formatted data. If \s-1COLUMN\s0 is numeric
and \s-1AS\s0 is not defined, then \s-1AS\s0 will be the same value as \s-1COLUMN\s0. Otherwise,
the default value of \s-1AS\s0 is \*(L"time\*(R".
.IP "\s-1FORMAT\s0" 4
.IX Item "FORMAT"
Optional Date::Format format string.
.RE
.RS 4
.RE
.IP "Return value" 4
.IX Item "Return value"
True if successful, false if not.
.IP "Side effects" 4
.IX Item "Side effects"
Changes values in \s-1DATA\s0.
.IP "Dependencies" 4
.IX Item "Dependencies"
The \f(CW\*(C`timeCalc\*(C'\fR function.
.Sh "timeCalc(\s-1DATE\s0 [, \s-1FORMAT\s0, \s-1OFFSET\s0])"
.IX Subsection "timeCalc(DATE [, FORMAT, OFFSET])"
Format time strings using user's format preference.
.IP "Parameters" 4
.IX Item "Parameters"
.RS 4
.PD 0
.IP "\s-1DATE\s0" 4
.IX Item "DATE"
.PD
Raw date from database.
.IP "\s-1FORMAT\s0" 4
.IX Item "FORMAT"
Optional format to override user's format.
.IP "\s-1OFFSET\s0" 4
.IX Item "OFFSET"
Optional positive or negative integer for offset seconds from \s-1GMT\s0,
to override user's offset.
.RE
.RS 4
.RE
.IP "Return value" 4
.IX Item "Return value"
Formatted date string.
.IP "Dependencies" 4
.IX Item "Dependencies"
The 'atonish' and 'aton' template blocks.
.Sh "\fIchangePassword()\fP"
.IX Subsection "changePassword()"
Return new random 8\-character password composed of 0..9, A..Z, a..z
(but not including possibly hard-to-read characters [0O1Iil]).
.IP "Return value" 4
.IX Item "Return value"
Random password.
.Sh "encryptPassword(\s-1PASSWD\s0)"
.IX Subsection "encryptPassword(PASSWD)"
Encrypts given password. Currently uses \s-1MD5\s0, but could change in the future,
so do not depend on implementation.
.IP "Parameters" 4
.IX Item "Parameters"
.RS 4
.PD 0
.IP "\s-1PASSWD\s0" 4
.IX Item "PASSWD"
.PD
Password to be encrypted.
.RE
.RS 4
.RE
.IP "Return value" 4
.IX Item "Return value"
Encrypted password.
.Sh "stripByMode(\s-1STRING\s0 [, \s-1MODE\s0, \s-1NO_WHITESPACE_FIX\s0])"
.IX Subsection "stripByMode(STRING [, MODE, NO_WHITESPACE_FIX])"
Private function. Fixes up a string based on what the mode is. This
function is no longer exported, use the \f(CW\*(C`strip_*\*(C'\fR functions instead.
.Sp
.RS 4
[ Should this be somewhat templatized, so they can customize
the little \s-1HTML\s0 bits? Same goes with related functions. \*(-- pudge ]
.RE
.IP "Parameters" 4
.IX Item "Parameters"
.RS 4
.PD 0
.IP "\s-1STRING\s0" 4
.IX Item "STRING"
.PD
The string to be manipulated.
.IP "\s-1MODE\s0" 4
.IX Item "MODE"
May be one of:
.IP "nohtml" 4
.IX Item "nohtml"
The default. Just strips out \s-1HTML\s0.
.IP "literal" 4
.IX Item "literal"
Prints the text verbatim into \s-1HTML\s0, which
means just converting < and > and & to their
\&\s-1HTML\s0 entities. Also turns on \s-1NO_WHITESPACE_FIX\s0.
.IP "extrans" 4
.IX Item "extrans"
Similarly to 'literal', converts everything
to its \s-1HTML\s0 entity, but then formatting is
preserved by converting spaces to \s-1HTML\s0
space entities, and multiple newlines into \s-1BR\s0
tags.
.IP "code" 4
.IX Item "code"
Just like 'extrans' but wraps in \s-1CODE\s0 tags.
.IP "attribute" 4
.IX Item "attribute"
Attempts to format string to fit in as an \s-1HTML\s0
attribute, which means the same thing as 'literal',
but " marks are also converted to their \s-1HTML\s0 entity.
.IP "plaintext" 4
.IX Item "plaintext"
Similar to 'extrans', but does not translate < and >
and & first (so \f(CW\*(C`stripBadHtml\*(C'\fR is called first).
.IP "anchor" 4
.IX Item "anchor"
Removes \s-1ALL\s0 whitespace from inside the filter. It's
is indented for use (but not limited to) the removal
of white space from in side \s-1HREF\s0 anchor tags to
prevent nasty browser artifacts from showing up in
the display. (Note: the value of \s-1NO_WHITESPACE_FIX\s0
is ignored)
.IP "html (or anything else)" 4
.IX Item "html (or anything else)"
Just runs through \f(CW\*(C`stripBadHtml\*(C'\fR.
.IP "\s-1NO_WHITESPACE_FIX\s0" 4
.IX Item "NO_WHITESPACE_FIX"
A boolean that, if true, disables fixing of whitespace
problems. A common exploit in these things is to
run a lot of characters together so the page will
stretch very wide. If \s-1NO_WHITESPACE_FIX\s0 is false,
then space is inserted to prevent this (see \f(CW\*(C`breakHtml\*(C'\fR).
.RE
.RS 4
.RE
.IP "Return value" 4
.IX Item "Return value"
The manipulated string.
.Sh "strip_anchor(\s-1STRING\s0 [, \s-1NO_WHITESPACE_FIX\s0])"
.IX Subsection "strip_anchor(STRING [, NO_WHITESPACE_FIX])"
.Sh "strip_attribute(\s-1STRING\s0 [, \s-1NO_WHITESPACE_FIX\s0])"
.IX Subsection "strip_attribute(STRING [, NO_WHITESPACE_FIX])"
.Sh "strip_code(\s-1STRING\s0 [, \s-1NO_WHITESPACE_FIX\s0])"
.IX Subsection "strip_code(STRING [, NO_WHITESPACE_FIX])"
.Sh "strip_extrans(\s-1STRING\s0 [, \s-1NO_WHITESPACE_FIX\s0])"
.IX Subsection "strip_extrans(STRING [, NO_WHITESPACE_FIX])"
.Sh "strip_html(\s-1STRING\s0 [, \s-1NO_WHITESPACE_FIX\s0])"
.IX Subsection "strip_html(STRING [, NO_WHITESPACE_FIX])"
.Sh "strip_literal(\s-1STRING\s0 [, \s-1NO_WHITESPACE_FIX\s0])"
.IX Subsection "strip_literal(STRING [, NO_WHITESPACE_FIX])"
.Sh "strip_nohtml(\s-1STRING\s0 [, \s-1NO_WHITESPACE_FIX\s0])"
.IX Subsection "strip_nohtml(STRING [, NO_WHITESPACE_FIX])"
.Sh "strip_notags(\s-1STRING\s0 [, \s-1NO_WHITESPACE_FIX\s0])"
.IX Subsection "strip_notags(STRING [, NO_WHITESPACE_FIX])"
.Sh "strip_plaintext(\s-1STRING\s0 [, \s-1NO_WHITESPACE_FIX\s0])"
.IX Subsection "strip_plaintext(STRING [, NO_WHITESPACE_FIX])"
.Sh "strip_mode(\s-1STRING\s0 [, \s-1MODE\s0, \s-1NO_WHITESPACE_FIX\s0])"
.IX Subsection "strip_mode(STRING [, MODE, NO_WHITESPACE_FIX])"
Wrapper for \f(CW\*(C`stripByMode\*(C'\fR. \f(CW\*(C`strip_mode\*(C'\fR simply calls \f(CW\*(C`stripByMode\*(C'\fR
and has the same arguments, but \f(CW\*(C`strip_mode\*(C'\fR will only allow modes
with values greater than 0, that is, the user-supplied modes. \f(CW\*(C`strip_mode\*(C'\fR
is only meant to be used for processing user-supplied modes, to prevent
the user from accessing other mode types. For using specific modes instead
of user-supplied modes, use the function with that mode's name.
.PP
See \f(CW\*(C`stripByMode\*(C'\fR for details.
.Sh "stripBadHtml(\s-1STRING\s0)"
.IX Subsection "stripBadHtml(STRING)"
Private function. Strips out \*(L"bad\*(R" \s-1HTML\s0 by removing unbalanced \s-1HTML\s0
tags and sending balanced tags through \f(CW\*(C`approveTag\*(C'\fR. The \*(L"unbalanced\*(R"
checker is primitive; no "<\*(L" or \*(R">" tags will are allowed inside
tag attributes (such as ), that breaks the tag.
Also, whitespace is inserted between adjacent tags, so "<\s-1BR\s0><\s-1BR\s0>\*(L"
becomes \*(R"<\s-1BR\s0> <\s-1BR\s0>".
.IP "Parameters" 4
.IX Item "Parameters"
.RS 4
.PD 0
.IP "\s-1STRING\s0" 4
.IX Item "STRING"
.PD
String to be processed.
.RE
.RS 4
.RE
.IP "Return value" 4
.IX Item "Return value"
Processed string.
.IP "Dependencies" 4
.IX Item "Dependencies"
\&\f(CW\*(C`approveTag\*(C'\fR function.
.Sh "breakHtml(\s-1TEXT\s0, \s-1MAX_WORD_LENGTH\s0)"
.IX Subsection "breakHtml(TEXT, MAX_WORD_LENGTH)"
Private function. Break up long words in some text. Will ignore the
contents of \s-1HTML\s0 tags. Called from \f(CW\*(C`stripByMode\*(C'\fR functions.
.IP "Parameters" 4
.IX Item "Parameters"
.RS 4
.PD 0
.IP "\s-1TEXT\s0" 4
.IX Item "TEXT"
.PD
The text to be fixed.
.IP "\s-1MAX_WORD_LENGTH\s0" 4
.IX Item "MAX_WORD_LENGTH"
The maximum length of a word. Default is 50.
.RE
.RS 4
.RE
.IP "Return value" 4
.IX Item "Return value"
The text.
.Sh "fixHref(\s-1URL\s0 [, \s-1ERROR\s0])"
.IX Subsection "fixHref(URL [, ERROR])"
Take a relative \s-1URL\s0 and fix it to some predefined set.
.PP
I don't really like this function much, it should be played with.
.IP "Parameters" 4
.IX Item "Parameters"
.RS 4
.PD 0
.IP "\s-1URL\s0" 4
.IX Item "URL"
.PD
Relative \s-1URL\s0 to manipulate.
.IP "\s-1ERROR\s0" 4
.IX Item "ERROR"
Boolean whether or not to return error number.
.RE
.RS 4
.RE
.IP "Return value" 4
.IX Item "Return value"
Undef if \s-1URL\s0 is not handled. If it is handled and \s-1ERROR\s0 is false,
new \s-1URL\s0 is returned. If it is handled and \s-1ERROR\s0 is true, \s-1URL\s0
and the error number are returned.
.IP "Dependencies" 4
.IX Item "Dependencies"
The fixhrefs section in the vars table, and some sort of table
(like 404\-main) for determining what the number means.
.Sh "approveTag(\s-1TAG\s0)"
.IX Subsection "approveTag(TAG)"
Private function. Checks to see if \s-1HTML\s0 tag is \s-1OK\s0, and adjusts it as necessary.
.IP "Parameters" 4
.IX Item "Parameters"
.RS 4
.PD 0
.IP "\s-1TAG\s0" 4
.IX Item "TAG"
.PD
Tag to check.
.RE
.RS 4
.RE
.IP "Return value" 4
.IX Item "Return value"
Tag after processing.
.IP "Dependencies" 4
.IX Item "Dependencies"
Uses the \*(L"approvetags\*(R" variable in the vars table. Passes URLs
in HREFs through \f(CW\*(C`fudgeurl\*(C'\fR.
.Sh "fixparam(\s-1DATA\s0)"
.IX Subsection "fixparam(DATA)"
Prepares data to be a parameter in a \s-1URL\s0. Such as:
.Sp
.Vb 1
\& my $url = 'http://example.com/foo.pl?bar=' . fixparam($data);
.Ve
.IP "Parameters" 4
.IX Item "Parameters"
.RS 4
.PD 0
.IP "\s-1DATA\s0" 4
.IX Item "DATA"
.PD
The data to be escaped.
.RE
.RS 4
.RE
.IP "Return value" 4
.IX Item "Return value"
The escaped data.
.Sh "fixurl(\s-1DATA\s0)"
.IX Subsection "fixurl(DATA)"
Prepares data to be a \s-1URL\s0 or in part of a \s-1URL\s0. Such as:
.Sp
.Vb 1
\& my $url = 'http://example.com/~' . fixurl($data) . '/';
.Ve
.IP "Parameters" 4
.IX Item "Parameters"
.RS 4
.PD 0
.IP "\s-1DATA\s0" 4
.IX Item "DATA"
.PD
The data to be escaped.
.RE
.RS 4
.RE
.IP "Return value" 4
.IX Item "Return value"
The escaped data.
.Sh "fudgeurl(\s-1DATA\s0)"
.IX Subsection "fudgeurl(DATA)"
Prepares data to be a \s-1URL\s0. Such as:
.Sp
.Vb 1
\& my $url = fixparam($someurl);
.Ve
.IP "Parameters" 4
.IX Item "Parameters"
.RS 4
.PD 0
.IP "\s-1DATA\s0" 4
.IX Item "DATA"
.PD
The data to be escaped.
.RE
.RS 4
.RE
.IP "Return value" 4
.IX Item "Return value"
The escaped data.
.Sh "chopEntity(\s-1STRING\s0)"
.IX Subsection "chopEntity(STRING)"
Chops a string to a specified length, without splitting in the middle
of an \s-1HTML\s0 entity or \s-1HTML\s0 tag (so we will err on the short side).
.IP "Parameters" 4
.IX Item "Parameters"
.RS 4
.PD 0
.IP "\s-1STRING\s0" 4
.IX Item "STRING"
.PD
String to be chomped.
.RE
.RS 4
.RE
.IP "Return value" 4
.IX Item "Return value"
Chomped string.
.Sh "balanceTags(\s-1HTML\s0 [, \s-1DEEP_NESTING\s0])"
.IX Subsection "balanceTags(HTML [, DEEP_NESTING])"
Balances \s-1HTML\s0 tags; if tags are not closed, close them; if they are not
open, remove close tags; if they are in the wrong order, reorder them
(order of open tags determines order of close tags).
.IP "Parameters" 4
.IX Item "Parameters"
.RS 4
.PD 0
.IP "\s-1HTML\s0" 4
.IX Item "HTML"
.PD
The \s-1HTML\s0 to balance.
.IP "\s-1DEEP_NESTING\s0" 4
.IX Item "DEEP_NESTING"
Integer for how deep to allow nesting indenting tags, 0 means
no limit.
.RE
.RS 4
.RE
.IP "Return value" 4
.IX Item "Return value"
The balances \s-1HTML\s0.
.IP "Dependencies" 4
.IX Item "Dependencies"
The 'approvedtags' and 'lonetags' entries in the vars table.
.Sh "parseDomainTags(\s-1HTML\s0, \s-1RECOMMENDED\s0, \s-1NOTAGS\s0)"
.IX Subsection "parseDomainTags(HTML, RECOMMENDED, NOTAGS)"
To be called before sending the \s-1HTML\s0 to the user for display. Takes
\&\s-1HTML\s0 with domain tags (see \fIaddDomainTags()\fR) and parses out the tags,
if necessary.
.IP "Parameters" 4
.IX Item "Parameters"
.RS 4
.PD 0
.IP "\s-1HTML\s0" 4
.IX Item "HTML"
.PD
The \s-1HTML\s0 with tagged with domains.
.IP "\s-1RECOMMENDED\s0" 4
.IX Item "RECOMMENDED"
Boolean for whether or not domain tags are recommended. They are not
required, the user can choose to leave it up to us.
.IP "\s-1NOTAGS\s0" 4
.IX Item "NOTAGS"
Boolean overriding \s-1RECOMMENDED\s0; it strips out all domain tags if true.
.RE
.RS 4
.RE
.IP "Return value" 4
.IX Item "Return value"
The parsed \s-1HTML\s0.
.Sh "addDomainTags(\s-1HTML\s0)"
.IX Subsection "addDomainTags(HTML)"
To be called only after \f(CW\*(C`balanceTags\*(C'\fR, or results are not guaranteed.
Munges \s-1HTML\s0 tags into tags, where
\&\*(L"foo.com\*(R" is the domain name of the link found in the opening
tag. Note that this is not proper \s-1HTML\s0, and that \f(CW\*(C`dispComment\*(C'\fR knows
how properly to convert it back to proper \s-1HTML\s0.
.IP "Parameters" 4
.IX Item "Parameters"
.RS 4
.PD 0
.IP "\s-1HTML\s0" 4
.IX Item "HTML"
.PD
The \s-1HTML\s0 to tag with domains.
.RE
.RS 4
.RE
.IP "Return value" 4
.IX Item "Return value"
The tagged \s-1HTML\s0.
.Sh "xmlencode_plain(\s-1TEXT\s0)"
.IX Subsection "xmlencode_plain(TEXT)"
Same as xmlencode(\s-1TEXT\s0), but does not encode for use in \s-1HTML\s0. This is
currently \s-1ONLY\s0 for use for elements.
.IP "Parameters" 4
.IX Item "Parameters"
.RS 4
.PD 0
.IP "\s-1TEXT\s0" 4
.IX Item "TEXT"
.PD
Whatever text it is you want to encode.
.RE
.RS 4
.RE
.IP "Return value" 4
.IX Item "Return value"
The encoded string.
.IP "Dependencies" 4
.IX Item "Dependencies"
\&\fIXML::Parser::Expat\fR\|(3).
.Sh "xmlencode(\s-1TEXT\s0)"
.IX Subsection "xmlencode(TEXT)"
Encodes / escapes a string for putting into \s-1XML\s0.
The text goes through three phases: we first convert
all \*(L"&\*(R" that are not part of an entity to \*(L"&\*(R"; then
we convert all \*(L"&\*(R", \*(L"<\*(R", and \*(L">\*(R" to their entities.
Then all characters that are not printable \s-1ASCII\s0 characters
(\e040 to \e176) are converted to their numeric entities
(such as \*(L"À\*(R").
.PP
Note that this is basically encoding a string into valid
\&\s-1HTML\s0, then escaping it for \s-1XML\s0. When run through regular
\&\s-1XML\s0 unescaping, a valid \s-1HTML\s0 string should remain
(that is, the characters will be valid for \s-1HTML\s0, while it
may not be syntactically correct). You may use something
like \f(CW\*(C`HTML::Entities::decode_entities\*(C'\fR if you wish to get
the regular text.
.IP "Parameters" 4
.IX Item "Parameters"
.RS 4
.PD 0
.IP "\s-1TEXT\s0" 4
.IX Item "TEXT"
.PD
Whatever text it is you want to encode.
.RE
.RS 4
.RE
.IP "Return value" 4
.IX Item "Return value"
The encoded string.
.IP "Dependencies" 4
.IX Item "Dependencies"
\&\fIXML::Parser::Expat\fR\|(3).
.Sh "xmldecode(\s-1TEXT\s0)"
.IX Subsection "xmldecode(TEXT)"
Decodes / unescapes an \s-1XML\s0 string. It basically just
decodes the five entities used to encode \*(L"<\*(R", \*(L">\*(R", '\*(L"',
\&\*(R"'\*(L", and \*(R"&\*(L". \*(R"&" is only decoded if it is not the start
of an entity.
.PP
This will decode the named, decimal numeric, or hex numeric
versions of the entities.
.PP
Note that while \f(CW\*(C`xmlencode\*(C'\fR will make sure the characters
in the string are proper \s-1HTML\s0 characters, \f(CW\*(C`xmldecode\*(C'\fR will
not take the extra step to get back the original non-HTML
text; we want to leave the text as \s-1OK\s0 to put directly into
\&\s-1HTML\s0. You may use something like
\&\f(CW\*(C`HTML::Entities::decode_entities\*(C'\fR if you wish to get
the regular text.
.IP "Parameters" 4
.IX Item "Parameters"
.RS 4
.PD 0
.IP "\s-1TEXT\s0" 4
.IX Item "TEXT"
.PD
Whatever text it is you want to decode.
.RE
.RS 4
.RE
.IP "Return value" 4
.IX Item "Return value"
The decoded string.
.Sh "getArmoredEmail (\s-1UID\s0)"
.IX Subsection "getArmoredEmail (UID)"
Returns a Spam Armored email address for the user associated with the
given \s-1UID\s0.
.PP
This routine \s-1DOES\s0 \s-1NOT\s0 save its results back to the user record. This is
the responsibility of the calling routine.
.IP "Parameters" 4
.IX Item "Parameters"
.RS 4
.PD 0
.IP "\s-1UID\s0" 4
.IX Item "UID"
.PD
The user's \s-1ID\s0 whose email address you wish to randomize.
.RE
.RS 4
.RE
.IP "Return value" 4
.IX Item "Return value"
The email address, if successful.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fISlash\fR\|(3), \fISlash::Utility\fR\|(3).
.SH "VERSION"
.IX Header "VERSION"
$Id: Data.pm,v 1.1.2.39 2002/07/03 17:06:09 pudge Exp $