X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fbabel.php;h=51bbf7c8a4b7ef8c6382dc21aa1c2dbfaee5c59c;hb=9c507e9577286c757df1946441f30e529082a3c8;hp=b9846e4fb433a16867f7d6afd20bedff2cbd0aac;hpb=8a46c786f37550160d81e7b7ecbcacb4c9fff493;p=friendica.git diff --git a/mod/babel.php b/mod/babel.php index b9846e4fb4..51bbf7c8a4 100644 --- a/mod/babel.php +++ b/mod/babel.php @@ -72,6 +72,21 @@ function babel_content() 'title' => L10n::t('BBCode::toMarkdown => Markdown::convert => HTML::toBBCode'), 'content' => visible_whitespace($bbcode4) ]; + + $item = [ + 'body' => $bbcode, + 'tag' => '', + ]; + + \Friendica\Model\Item::setHashtags($item); + $results[] = [ + 'title' => L10n::t('Item Body'), + 'content' => visible_whitespace($item['body']) + ]; + $results[] = [ + 'title' => L10n::t('Item Tags'), + 'content' => $item['tag'] + ]; break; case 'markdown': $markdown = trim($_REQUEST['text']); @@ -83,7 +98,7 @@ function babel_content() $html = Text\Markdown::convert($markdown); $results[] = [ 'title' => L10n::t('Markdown::convert (raw HTML)'), - 'content' => htmlspecialchars($html) + 'content' => visible_whitespace(htmlspecialchars($html)) ]; $results[] = [ @@ -142,7 +157,7 @@ function babel_content() $tpl = Renderer::getMarkupTemplate('babel.tpl'); $o = Renderer::replaceMacros($tpl, [ - '$text' => ['text', L10n::t('Source text'), htmlentities(defaults($_REQUEST, 'text', '')), ''], + '$text' => ['text', L10n::t('Source text'), defaults($_REQUEST, 'text', ''), ''], '$type_bbcode' => ['type', L10n::t('BBCode'), 'bbcode', '', defaults($_REQUEST, 'type', 'bbcode') == 'bbcode'], '$type_markdown' => ['type', L10n::t('Markdown'), 'markdown', '', defaults($_REQUEST, 'type', 'bbcode') == 'markdown'], '$type_html' => ['type', L10n::t('HTML'), 'html', '', defaults($_REQUEST, 'type', 'bbcode') == 'html'],