소스 검색

Ensure RSS is UTF-8 encoded

George S. Baugh 5 년 전
부모
커밋
738995b3a6
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      lib/Trog/Routes/HTML.pm

+ 2 - 1
lib/Trog/Routes/HTML.pm

@@ -907,7 +907,8 @@ sub _rss ($query,$posts) {
         );
     }
 
-    return [200, ["Content-type: application/rss+xml\n"], [$rss->as_string]];
+    require Encode;
+    return [200, ["Content-type: application/rss+xml\n"], [Encode::encode_utf8($rss->as_string)]];
 }
 
 =head2 manual