From c356da2cadc04d05c930ae0d4ec34a52a605b55d Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 5 Jul 2015 02:33:28 +0200 Subject: [PATCH] Diaspora: Improved parsing of linefeeds --- include/bb2diaspora.php | 9 +++++++++ view/theme/vier/style.css | 1 + 2 files changed, 10 insertions(+) diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index 34c932f745..69a87b3817 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -34,6 +34,15 @@ function diaspora2bb($s) { $s = str_replace('#','#',$s); + $search = array(" \n", "\n "); + $replace = array("\n", "\n"); + do { + $oldtext = $s; + $s = str_replace($search, $replace, $s); + } while ($oldtext != $s); + + $s = str_replace("\n\n", "
", $s); + $s = html2bbcode($s); // protect the recycle symbol from turning into a tag, but without unescaping angles and naked ampersands diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index 64edef3012..79309e338e 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -1216,6 +1216,7 @@ section.minimal { .wall-item-container .wall-item-content img { max-width: 100%; + vertical-align: middle; /* max-width: 650px; */ /* max-width: 580px; */ } -- 2.39.5