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
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Tags <ul><li> on error message In reply to
It is perfect!
Thanks! Smile

Mick