For more information... RTFM!
NAVIGATION
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

vars_and_comments

Replace any "__VARIABLES__" with their content, and strip "[comment]comment tags[/comment]" ICML container tags.

Availability

Availability

This filter was introduced in version 5.4.0, and is therefore not available for use with any earlier Interchange version.

Example

  1. [filter vars_and_comments]
  2. __KEVIN__ [comment]This is a comment[/comment]__WALSH__
  3. [/filter]

Results in:

  1. Kevin Walsh

Source code

sub {
    my $val = shift;
    shift;

    my %allowed;
    $allowed{lc $_} = 1 for @_;

    $val =~ s{<(/?(\w[-\w]*)[\s>])}{ ($allowed{lc $2} ? '<' : '&lt;') . $1 }ge;
    return $val;
}

Category:  Filters
Last modified by: Kevin Walsh
Modification date: Thursday 1 March 2007 at 3:59 PM (EST)
Home  |  Legal nonsense  |  Privacy policy  |  Contact us