--- /Users/btucker/.cpan/build/Petal-2.19/lib/Petal/Hash.pm	2006-01-27 08:02:30.000000000 -0500
+++ Petal/Hash.pm	2006-07-27 01:57:44.000000000 -0400
@@ -129,9 +129,14 @@
     my $key  = shift;
     my $res  = $self->get ($key);
     return unless (defined $res);
+    my $no_encode;
+    if ($no_encode = ref $res eq "SCALAR")
+    {
+      $res = $$res;
+    } 
+    $no_encode ||= $key =~ s/^\s*structure\s+//;
 
-    my $no_encode = $key =~ s/^\s*structure\s+//;
-    unless ($no_encode and $no_encode)
+    unless ($no_encode)
     {
         $res =~ s/\&/\&amp;/g;
         $res =~ s/\</\&lt;/g;
