[ic] [table-editor] and entitiies

John Young john_young at sonic.net
Wed Sep 24 01:54:18 EDT 2003

Paul Vinciguerra wrote:
> I have been reading through the sources trying to figure out a simple problem,
> but am completely at a loss.  I am trying to create a checkboxed list of URLs,
> but seems it is being run through the entities filter.
> Here is the snippet of my code.  Is there an extended value that needs to be
> set to keep from filtering the entities?
> [perl]
>   my $fields = "";
>   for (@{$Tmp->{sitesref}}) {
>     my $code = $_->[0];
>     my $name = $_->[1];
>     my $url  = $_->[2];
>       $fields .= qq{$code=<a href="$url">$name</a>, };
>   }
> $Scratch->{sites_list} = $fields;
> return $fields;
> [/perl]

(...[table-editor] stuff omitted...)

You might need to have the scratch variable sites_list already created
before you refer to like so above (if you haven't already -- e.g. w/[set]).

Also, I believe you can reduce that perl block above to this (untested, 
of course):

     for (@{$Tmp->{sitesref}}) {
         my ($code, $name, $url) = @{$_};
         $Scratch->{sites_list} .= qq{$code=<a href="$url">$name</a>, };

or perhaps even obfuscated:

     $Scratch->{sites_list} .= qq{$_->[0]=<a href="$_->[2]">$_->[1]</a>, 
} for (@{$Tmp->{sitesref}});

John Young

More information about the interchange-users mailing list