Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] use HTML::Entities in UserTag?




Joachim,

I am also in a muddle because I copied your encode UserTag exactly as
it appears below and restarted minivend and it seems to work just fine!
I tried your example and put:
	[encode]MÜLLER[/encode]
in a page. When I look at the page with View->Page Source I get:
	MÜLLER
Is that not correct?

Originally, I thought you might be having problems with the redundent
(and pointless) assignment statement:
	$message = $message;
but having that in there doesn't seem to make any difference.

I would have written it like this, though:

	sub {
	    my ($message) = @_;
	    use HTML::Entities;
	    return encode_entities($message);
	}

Do you have an example usage that doesn't work?

	-Bill

P.S. The code snippet:
	return join '<BR>',@INC;  # where is perl
prints the directories perl searches for modules, one per line. E.g.:
	dir1<BR>dir2<BR>dir3<BR>dir4 etc.


On Mar 15,  4:19pm, jojo@buchonline.net wrote:
} Subject: Re: [mv] use HTML::Entities in UserTag?
}
} [ text/plain
}   Encoded with "quoted-printable" ] :
******    message to minivend-users from jojo@buchonline.net     ******
}
} On 15 Mar, cfm@maine.com wrote:
} > ******    message to minivend-users from cfm@maine.com     ******
} >> ******    message to minivend-users from jojo@buchonline.net     ******
} >> --------------snipp----------
} >> # [encode] message [/encode]
} >> #
} >> # This tag is the equivalent of [L] ... [/L] localization, except
} >> # it works with contained tags
} >> #
} >>
} >> UserTag encode hasEndTag   1
} >> UserTag encode Interpolate 1
} >> UserTag encode Routine <<EOF
} >> sub {
} >>     my ($message) = @_;
} >>     use HTML::Entities;
} >>     encode_entities($message);
} >>     $message = $message;
} >>     return $message;
} >> }
} >> EOF
} >
} > Develop a way to debug.
} >
} > return join '<BR>',@INC;  # where is perl
} >
} > HTML::Entities::encode_entities($message); # I don't use it, don't know
syntax
} >
} > then maybe eval{} and return $@ if defined($@);
} >
} > You can also add HTML::Entities into bin/minivend.  I'm
} > not real up on the differences between use and require and how
} > those will play in a UserTag.
}
}
} Hi cfm,
}
} i'm a newbie in perl and it is hard to understand perl.
} I don't understand, how to use
}
} return join '<BR>',@INC;  # where is perl
}
} A little perl script like
}
} --------snipp--------
} #!/usr/bin/perl
} use HTML::Entities;
} $string = 'MÜLLER';
} encode_entities($string);
} print $string . "\n";
} --------snapp--------
}
} works! I have tried HTML::Entities::encode_entities($message); too. It
} doesn't works! I have tried "use HTML::Entities" in bin/minivend. It
} doesn't works! I get no any messages in my error.log or anywhere!
}
}
} I am in a muddle! Any helps will be very appreciate!
}
} Thanks!
}
} Joachim

Search for: Match: Format: Sort by: