From 5df58ac79f3a55bfd78ea4119183caabab42a65c Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 9 Apr 2008 22:27:41 +0000 Subject: [PATCH] fixed: international characters corrupted in titles --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Session/Output.pm | 16 ++++++++++------ lib/WebGUI/URL/Credits.pm | 2 +- lib/WebGUI/URL/Snoop.pm | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 88f29e1dd..319d4ae2a 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -19,6 +19,7 @@ - fixed: email validation links can be broken by mail servers - fixed: Clipboard select all doesn't work with one item in IE - fixed: able to view visitor profile, send private messages, add as friend + - fixed: international characters corrupted in titles 7.5.9 - fixed: Collaboration System attachments follow site's max size instead of CS's diff --git a/lib/WebGUI/Session/Output.pm b/lib/WebGUI/Session/Output.pm index a3eae6354..3f6e7dfde 100644 --- a/lib/WebGUI/Session/Output.pm +++ b/lib/WebGUI/Session/Output.pm @@ -89,12 +89,16 @@ sub print { my $content = shift; my $skipMacros = shift; WebGUI::Macro::process($self->session, \$content) unless $skipMacros; - my $handle = $self->{_handle}; - if (defined $handle) { - print $handle $content; - } else { - print $content; - } + my $handle = $self->{_handle}; + if (defined $handle) { + print $handle $content; + } + elsif ($self->session->request) { + $self->session->request->print($content); + } + else { + print $content; + } } #------------------------------------------------------------------- diff --git a/lib/WebGUI/URL/Credits.pm b/lib/WebGUI/URL/Credits.pm index d95df45f2..90a081cd9 100644 --- a/lib/WebGUI/URL/Credits.pm +++ b/lib/WebGUI/URL/Credits.pm @@ -54,7 +54,7 @@ sub handler { $content .= $line; } close($FILE); - print $content; + $request->print($content); return Apache2::Const::OK; } ); $request->push_handlers(PerlTransHandler => sub { return Apache2::Const::OK }); diff --git a/lib/WebGUI/URL/Snoop.pm b/lib/WebGUI/URL/Snoop.pm index b5553c89e..4397f8ad9 100644 --- a/lib/WebGUI/URL/Snoop.pm +++ b/lib/WebGUI/URL/Snoop.pm @@ -49,7 +49,7 @@ sub handler { my ($request, $server, $config) = @_; $request->content_type("text/html"); $request->push_handlers(PerlResponseHandler => sub { - print q|Snoopy
Why would you type in this URL? Really. What were you expecting to see here? You really need to get a life. Are you still here? Seriously, you need to go do something else. I think your boss is calling.
|; + $request->print(q|Snoopy
Why would you type in this URL? Really. What were you expecting to see here? You really need to get a life. Are you still here? Seriously, you need to go do something else. I think your boss is calling.
|); return Apache2::Const::OK; } ); $request->push_handlers(PerlTransHandler => sub { return Apache2::Const::OK });