mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 04:05:16 +02:00
focus preg_replace to prevent it from catching too much
This commit is contained in:
parent
bd08a6b565
commit
92db5e5ec2
2 changed files with 83 additions and 4 deletions
|
@ -19,6 +19,12 @@ function babel_content(&$a) {
|
|||
|
||||
$o .= '<br /><br />';
|
||||
|
||||
$o .= '<form action="babel" method="post">';
|
||||
$o .= t('Source (Diaspora) text to convert to BBcode:') . EOL . '<textarea name="d2bbtext" >' . htmlspecialchars($_REQUEST['d2bbtext']) .'</textarea>' . EOL;
|
||||
$o .= '<input type="submit" name="submit" value="Submit" /></form>';
|
||||
|
||||
$o .= '<br /><br />';
|
||||
|
||||
if(x($_REQUEST,'text')) {
|
||||
|
||||
$text = trim($_REQUEST['text']);
|
||||
|
@ -52,5 +58,18 @@ function babel_content(&$a) {
|
|||
|
||||
|
||||
}
|
||||
|
||||
if(x($_REQUEST,'d2bbtext')) {
|
||||
|
||||
$d2bbtext = trim($_REQUEST['d2bbtext']);
|
||||
$o .= t("Source input (Diaspora format): ") . EOL. EOL;
|
||||
$o .= visible_lf($d2bbtext) . EOL. EOL;
|
||||
|
||||
|
||||
$bb = diaspora2bb($d2bbtext);
|
||||
$o .= t("diaspora2bb: ") . EOL. EOL;
|
||||
$o .= visible_lf($bb) . EOL. EOL;
|
||||
}
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue