fix_mce_lf on profiles

This commit is contained in:
friendica 2012-04-10 16:31:49 -07:00
parent 703bfcb6d4
commit 9b1bb53234
2 changed files with 16 additions and 10 deletions

View file

@ -1506,3 +1506,8 @@ function undo_post_tagging($s) {
return $s; return $s;
} }
function fix_mce_lf($s) {
$s = str_replace("\r\n","\n",$s);
$s = str_replace("\n\n","\n",$s);
return $s;
}

View file

@ -121,16 +121,17 @@ function profiles_post(&$a) {
$politic = notags(trim($_POST['politic'])); $politic = notags(trim($_POST['politic']));
$religion = notags(trim($_POST['religion'])); $religion = notags(trim($_POST['religion']));
$about = escape_tags(trim($_POST['about'])); $about = fix_mce_lf(escape_tags(trim($_POST['about'])));
$interest = escape_tags(trim($_POST['interest'])); $interest = fix_mce_lf(escape_tags(trim($_POST['interest'])));
$contact = escape_tags(trim($_POST['contact'])); $contact = fix_mce_lf(escape_tags(trim($_POST['contact'])));
$music = escape_tags(trim($_POST['music'])); $music = fix_mce_lf(escape_tags(trim($_POST['music'])));
$book = escape_tags(trim($_POST['book'])); $book = fix_mce_lf(escape_tags(trim($_POST['book'])));
$tv = escape_tags(trim($_POST['tv'])); $tv = fix_mce_lf(escape_tags(trim($_POST['tv'])));
$film = escape_tags(trim($_POST['film'])); $film = fix_mce_lf(escape_tags(trim($_POST['film'])));
$romance = escape_tags(trim($_POST['romance'])); $romance = fix_mce_lf(escape_tags(trim($_POST['romance'])));
$work = escape_tags(trim($_POST['work'])); $work = fix_mce_lf(escape_tags(trim($_POST['work'])));
$education = escape_tags(trim($_POST['education'])); $education = fix_mce_lf(escape_tags(trim($_POST['education'])));
$hide_friends = (($_POST['hide-friends'] == 1) ? 1: 0); $hide_friends = (($_POST['hide-friends'] == 1) ? 1: 0);
$r = q("UPDATE `profile` $r = q("UPDATE `profile`