From f95f1592f76c63955e6b990382af13a9e83a14b4 Mon Sep 17 00:00:00 2001
From: shibafu
Date: Sun, 14 Apr 2019 17:40:21 +0900
Subject: [PATCH] =?UTF-8?q?content=E3=81=8C=E7=A9=BA=E3=81=AE=E3=81=A8?=
=?UTF-8?q?=E3=81=8D=E3=81=AFHTML=E3=81=A8=E3=81=97=E3=81=A6=E3=81=AE?=
=?UTF-8?q?=E3=83=91=E3=83=BC=E3=82=B9=E3=82=92=E8=A1=8C=E3=82=8F=E3=81=AA?=
=?UTF-8?q?=E3=81=84=E3=82=88=E3=81=86=E3=81=AB=E3=81=99=E3=82=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/MetadataResolver/ActivityPubResolver.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/MetadataResolver/ActivityPubResolver.php b/app/MetadataResolver/ActivityPubResolver.php
index 06328cb..7cf3e00 100644
--- a/app/MetadataResolver/ActivityPubResolver.php
+++ b/app/MetadataResolver/ActivityPubResolver.php
@@ -73,6 +73,10 @@ class ActivityPubResolver implements Resolver, Parser
private function html2text(string $html): string
{
+ if (empty($html)) {
+ return '';
+ }
+
$html = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8');
$html = preg_replace('~
|
\s*]*>~i', "\n", $html);
$dom = new \DOMDocument();