', $s); } function babel_content() { $o = '

Babel Diagnostic

'; $o .= '
'; $o .= L10n::t("Source \x28bbcode\x29 text:") . EOL; $o .= '' . EOL; $o .= '
'; $o .= '

'; $o .= '
'; $o .= L10n::t("Source \x28Diaspora\x29 text to convert to BBcode:") . EOL; $o .= '' . EOL; $o .= '
'; $o .= '

'; if (x($_REQUEST, 'text')) { $text = trim($_REQUEST['text']); $o .= '

' . L10n::t('Source input: ') . '

' . EOL . EOL; $o .= visible_lf($text) . EOL . EOL; $html = BBCode::convert($text); $o .= '

' . L10n::t("bbcode \x28raw HTML\x28: ") . '

' . EOL . EOL; $o .= htmlspecialchars($html) . EOL . EOL; $o .= '

' . L10n::t('bbcode: ') . '

' . EOL . EOL; $o .= $html . EOL . EOL; $bbcode = html2bbcode($html); $o .= '

' . L10n::t('bbcode => html2bbcode: ') . '

' . EOL . EOL; $o .= visible_lf($bbcode) . EOL . EOL; $diaspora = BBCode::toMarkdown($text); $o .= '

' . L10n::t('BBCode::toMarkdown: ') . '

' . EOL . EOL; $o .= visible_lf($diaspora) . EOL . EOL; $html = Markdown::convert($diaspora); $o .= '

' . L10n::t('BBCode::toMarkdown => Markdown::convert: ') . '

' . EOL . EOL; $o .= $html . EOL . EOL; $bbcode = Markdown::toBBCode($diaspora); $o .= '

' . L10n::t('BBCode::toMarkdown => Markdown::toBBCode: ') . '

' . EOL . EOL; $o .= visible_lf($bbcode) . EOL . EOL; $bbcode = html2bbcode($html); $o .= '

' . L10n::t('bbcode => html2bbcode: ') . '

' . EOL . EOL; $o .= visible_lf($bbcode) . EOL . EOL; } if (x($_REQUEST, 'd2bbtext')) { $d2bbtext = trim($_REQUEST['d2bbtext']); $o .= '

' . L10n::t("Source input \x28Diaspora format\x29: ") . '

' . EOL . EOL; $o .= '
' . $d2bbtext . '
' . EOL . EOL; $bb = Markdown::toBBCode($d2bbtext); $o .= '

' . L10n::t('diaspora2bb: ') . '

' . EOL . EOL; $o .= '
' . $bb . '
' . EOL . EOL; } return $o; }