Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Tags <ul><li> on error message

Quote Reply
Tags <ul><li> on error message
Hi,

I use escape_html on the error message <%escape_html error%>.

But, I obtain Tag HTML in the results : <ul><li>Error message...</li></ul>.

Also, there is a possible solution (global) for to remove these Tags (<ul><li>).

Thanks for your suggestion.

Mick

Quote Reply
Re: [MJ_] Tags <ul><li> on error message In reply to
You could try this:

clean_li_ul_msg
Code:
sub {
my $message = $_[0];
$message =~ s/\<\/?ul\>|\<\/?li\>//g;
return $message;
}

(I tested it locally, and it seems to do what you need =))

Simply call with:

Code:
<%set error = clean_li_ul_msg($error)%>

..and then your normal error stuff, ie:

Code:
<%error%>

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Tags <ul><li> on error message In reply to
It is perfect!
Thanks! Smile

Mick