]> git.mxchange.org Git - friendica-addons.git/blobdiff - ijpost/ijpost.php
Functions moved to HTML
[friendica-addons.git] / ijpost / ijpost.php
index 13ede61fe17d0bfc58114997f118e304bc276ac1..d2a3071eb742a5ef600d1b83e9c3fb4d6f2410da 100644 (file)
@@ -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);
        }
 }