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

Another annoying thing - EVERYTHING gets html_encoded!

Quote Reply
Another annoying thing - EVERYTHING gets html_encoded!
Hi,

How can I stop stuff I'm passing in a loop, from getting encoded?

Code:
my @entries;
while (my $hit = $sth->fetchrow_hashref) {
push @entries, $hit;
}

print GForum::Template->parse_print('guestbook_view.html' , { %$vars, entries_loop => \@entries } );

..and the value of $hit->{Contents} gets HTML encoded, thus shows all the HTML, instead of what its mean't to!

I've found a solution:
Code:
my @entries;
while (my $hit = $sth->fetchrow_hashref) {
push @entries, { %$hit, Contents => \$hit->{Contents} };
}

print GForum::Template->parse_print('guestbook_view.html' , { %$vars, entries_loop => \@entries } );

.. but surely there has to be a better way? :/

TIA

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!
Subject Author Views Date
Thread Another annoying thing - EVERYTHING gets html_encoded! Andy 3067 Feb 21, 2008, 8:43 AM
Thread Re: [Andy] Another annoying thing - EVERYTHING gets html_encoded!
brewt 2940 Feb 21, 2008, 3:15 PM
Post Re: [brewt] Another annoying thing - EVERYTHING gets html_encoded!
Andy 2945 Feb 22, 2008, 12:49 AM