[ic] [table-editor] and entitiies
Mike Heins
mike at perusion.com
Wed Sep 24 12:04:39 EDT 2003
Quoting Paul Vinciguerra (pvinci at vinciguerra.com):
> 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?
It cannot be done as is -- the encoding is done in the Vend::Form
box type.
With a small patch:
--- /r/Form.pm 2003-09-24 01:39:02.000000000 -0400
+++ /rt/Form.pm 2003-09-24 10:57:53.000000000 -0400
@@ -831,7 +831,8 @@
for(@$opts) {
my($value,$label) = @$_;
- encode($label, $ESCAPE_CHARS::std);
+ encode($label, $ESCAPE_CHARS::std)
+ unless $opt->{pre_filter} eq 'decode_entities';
if($value =~ /^\s*\~\~(.*)\~\~\s*$/) {
my $lab = $1;
$lab =~ s/"/"/g;
Then add pre_filter=decode_entities and it will work.
> [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
> wizard=1
> cgi=1
> ui_meta_view="entry_wizard"
> ui_wizard_fields="sites_selected"
> label.sites_selected="Which Sites?"
> help.sites_selected="Select sites to submit to"
> widget.sites_selected=checkbox_left_3
> filter.sites_selected="checkbox null_to_space"
> passed.sites_selected=`$Scratch->{sites_list}`
> default.sites_selected=""
> ]
> [/table-editor]
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.513.523.7621 <mike at perusion.com>
Few blame themselves until they have exhausted all other possibilities.
-- anonymous
More information about the interchange-users
mailing list