Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Allow HTML in Review Description field possible?

Quote Reply
Allow HTML in Review Description field possible?
I'm trying to add a review WITH html code in the description field, but when displaying the review it just shows the CODE and not the actual HTML. is there any hack to be able to insert HTML in a description field and have it show properly when displaying the review?
Quote Reply
Re: [jaltuve] Allow HTML in Review Description field possible? In reply to
Just enter the HTML in that field, and then make a new global. Something like;

Review_with_HTML =>
Code:
sub {

my $review = shift;
my $_review = unescape_html($review);
return $_review;

}

Call it with something like;

<%Review_with_HTML($FieldName)%>

Hopefully that will work Smile

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] Allow HTML in Review Description field possible? In reply to
Andy, the unescape_html method does not appear to exist, is this is custom method you created? or is it that maybe you mispelled it?
Quote Reply
Re: [jaltuve] Allow HTML in Review Description field possible? In reply to
Code:
sub { $IN->unescape_html(pop) }

Last edited by:

Paul: Jun 9, 2003, 9:00 AM
Quote Reply
Re: [Paul] Allow HTML in Review Description field possible? In reply to
Thanks to you both, but while searching why Andy's proposed method was not working I found this:

<%unescape_html Review_Contents%>

The template parser has that funtionality already built in, so no need for a global.
Quote Reply
Re: [jaltuve] Allow HTML in Review Description field possible? In reply to
Good point. You can also do the following which is the same thing:

<%GT::CGI::unescape_html($your_code)%>