Skip to content

Commit

Permalink
Item15030: encoding error including attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Jul 7, 2021
1 parent 001edd3 commit e308493
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/lib/Foswiki/IncludeHandlers/http.pm
Expand Up @@ -16,6 +16,7 @@ use strict;
use warnings;

use Foswiki ();
use Encode ();

BEGIN {
if ( $Foswiki::cfg{UseLocale} ) {
Expand Down Expand Up @@ -74,6 +75,7 @@ sub INCLUDE {
local $/;
$text = <$fh>;
$fh->close();
$text = Encode::decode_utf8($text);
unless ( $control->{raw} ) {

# SMELL: assumes the construction of pub URLs
Expand Down Expand Up @@ -209,7 +211,7 @@ sub _rewriteURLInInclude {
__END__
Foswiki - The Free and Open Source Wiki, http://foswiki.org/
Copyright (C) 2008-2010 Foswiki Contributors. Foswiki Contributors
Copyright (C) 2008-2021 Foswiki Contributors. Foswiki Contributors
are listed in the AUTHORS file in the root of this distribution.
NOTE: Please extend that file, not this notice.
Expand Down

0 comments on commit e308493

Please sign in to comment.