use Friendica\BaseObject;
use Friendica\Model\Contact;
use Michelf\MarkdownExtra;
+use Friendica\Content\Text\HTML;
/**
* Friendica-specific usage of Markdown
$s = str_replace('#', '#', $s);
- $s = Friendica\Content\Text\HTML::toBBCode($s);
+ $s = HTML::toBBCode($s);
// protect the recycle symbol from turning into a tag, but without unescaping angles and naked ampersands
$s = str_replace('♲', html_entity_decode('♲', ENT_QUOTES, 'UTF-8'), $s);
use Friendica\BaseObject;
use Friendica\Content\Text\BBCode;
+use Friendica\Content\Text\HTML;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
$n['timestamp'] = strtotime($local_time);
$n['date_rel'] = Temporal::getRelativeDate($n['date']);
$n['msg_html'] = BBCode::convert($n['msg'], false);
- $n['msg_plain'] = explode("\n", trim(Friendica\Content\Text\HTML::toPlaintext($n['msg_html'], 0)))[0];
+ $n['msg_plain'] = explode("\n", trim(HTML::toPlaintext($n['msg_html'], 0)))[0];
$rets[] = $n;
}
use Friendica\App;
use Friendica\Content\OEmbed;
use Friendica\Content\Text\BBCode;
+use Friendica\Content\Text\HTML;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
$purifier = new HTMLPurifier($config);
$item['body'] = $purifier->purify($item['body']);
- $item['body'] = @Friendica\Content\Text\HTML::toBBCode($item['body']);
+ $item['body'] = @HTML::toBBCode($item['body']);
}
/// @todo We should check for a repeated post and if we know the repeated author.
$body .= "Content-Transfer-Encoding: 8bit\n";
$body .= "Content-Type: text/plain; charset=utf-8; format=flowed\n\n";
- $body .= Friendica\Content\Text\HTML::toPlaintext($html)."\n";
+ $body .= HTML::toPlaintext($html)."\n";
$body .= "--=_".$part."\n";
$body .= "Content-Transfer-Encoding: 8bit\n";
use Friendica\Core\System;
use Friendica\Model\Item;
use Friendica\Util\Network;
+use Friendica\Content\Text\HTML;
+
use dba;
use DOMDocument;
use DOMXPath;
if (self::titleIsBody($item["title"], $body)) {
$item["title"] = "";
}
- $item["body"] = Friendica\Content\Text\HTML::toBBCode($body, $basepath);
+ $item["body"] = HTML::toBBCode($body, $basepath);
if (($item["body"] == '') && ($item["title"] != '')) {
$item["body"] = $item["title"];