X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=ijpost%2Fijpost.php;h=d2a3071eb742a5ef600d1b83e9c3fb4d6f2410da;hb=90b1ef56f7415a71f22feaa34377802a4a9d0fbb;hp=13ede61fe17d0bfc58114997f118e304bc276ac1;hpb=49eff56e5d1969a10bcc37c4aa0d8ae74c9f939d;p=friendica-addons.git diff --git a/ijpost/ijpost.php b/ijpost/ijpost.php index 13ede61f..d2a3071e 100644 --- a/ijpost/ijpost.php +++ b/ijpost/ijpost.php @@ -15,6 +15,7 @@ use Friendica\Core\Logger; use Friendica\Core\PConfig; use Friendica\Util\DateTimeFormat; use Friendica\Util\Network; +use Friendica\Util\XML; function ijpost_install() { @@ -185,7 +186,7 @@ function ijpost_send(&$a, &$b) if ($ij_username && $ij_password && $ij_blog) { $title = $b['title']; $post = BBCode::convert($b['body']); - $post = xmlify($post); + $post = XML::escape($post); $tags = ijpost_get_tags($b['tag']); $date = DateTimeFormat::convert($b['created'], $tz); @@ -222,12 +223,12 @@ function ijpost_send(&$a, &$b) EOT; - Logger::log('ijpost: data: ' . $xml, LOGGER_DATA); + Logger::log('ijpost: data: ' . $xml, Logger::DATA); if ($ij_blog !== 'test') { $x = Network::post($ij_blog, $xml, ["Content-Type: text/xml"])->getBody(); } - Logger::log('posted to insanejournal: ' . $x ? $x : '', LOGGER_DEBUG); + Logger::log('posted to insanejournal: ' . $x ? $x : '', Logger::DEBUG); } }