For more information... RTFM!
NAVIGATION
PAGES THAT LINK HERE
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

text2html

Rudimentary HTMLising of text.  This filter simply inserts paragraph and line break HTML tags as it sees fit.

Also see the html2text filter.

Example

[filter text2html]
Some text

Some more text
yet more text
[/filter]

Results in:

Some text<p>Some more text<br>yet more text<br>

Source code

sub {
    my $val = shift;
    $val =~ s!\r?\n\r?\n!<p>!g;
    $val =~ s!\r\r!<p>!g;
    $val =~ s!\r?\n!<br$Vend::Xtrailer>!g;
    $val =~ s!\r!<br$Vend::Xtrailer>!g;
    return $val;
}

Category:  Filters
Last modified by: Kevin Walsh
Modification date: Monday 26 February 2007 at 11:46 AM (EST)
Home  |  Legal nonsense  |  Privacy policy  |  Contact us