Skip to content

Commit

Permalink
Merge pull request #4 from soh335/fix-encode-feature/opensocial
Browse files Browse the repository at this point in the history
Fix encode feature/opensocial
  • Loading branch information
Shinichiro Sei committed Mar 13, 2012
2 parents e7ce6dd + f361a5d commit acff69e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Moxy/Plugin/OpenSocial.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use base 'Moxy::Plugin';
use URI::Escape;
use OAuth::Lite::Consumer;
use HTML::TreeBuilder;
use Encode;

sub control_panel :Hook {
my ($self, $context, $args) = @_;
Expand Down Expand Up @@ -94,7 +95,7 @@ sub response_filter :Hook {
$tree->implicit_tags(0);
$tree->no_space_compacting(1);
$tree->ignore_ignorable_whitespace(0);
#$tree->store_comments(1);
$tree->store_comments(1);
$tree->ignore_unknown(0);
$tree->parse_content($res->decoded_content);

Expand All @@ -119,7 +120,7 @@ sub response_filter :Hook {
}
}

$res->content( $tree->as_HTML );
$res->content( encode( $res->charset, $tree->as_HTML(q{<>"&'}, '', {}) ));
$tree->delete;
}
}
Expand Down

0 comments on commit acff69e

Please sign in to comment.