diff --git a/lib/private/app.php b/lib/private/app.php
index e75202eec230f4222dd1d1e3496753d72fffbad3..3a1f731d6210f828782a1cd115908a62b8d2596e 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -642,6 +642,10 @@ class OC_App {
 		$parser = new \OC\App\InfoParser(\OC::$server->getHTTPHelper(), \OC::$server->getURLGenerator());
 		$data = $parser->parse($file);
 
+		if(is_array($data)) {
+			$data = OC_App::parseAppInfo($data);
+		}
+
 		self::$appInfo[$appId] = $data;
 
 		return $data;
@@ -914,7 +918,8 @@ class OC_App {
 		$i = 0;
 		$l = \OC::$server->getL10N('core');
 		foreach ($remoteApps as $app) {
-			$app1[$i] = $app;
+			// enhance app info (for example the description)
+			$app1[$i] = OC_App::parseAppInfo($app);
 			$app1[$i]['author'] = $app['personid'];
 			$app1[$i]['ocs_id'] = $app['id'];
 			$app1[$i]['internal'] = $app1[$i]['active'] = 0;
@@ -1199,4 +1204,36 @@ class OC_App {
 			return false;
 		}
 	}
+
+	/**
+	 * parses the app data array and enhanced the 'description' value
+	 *
+	 * @param array $data the app data
+	 * @return array improved app data
+	 */
+	public static function parseAppInfo(array $data) {
+
+		// just modify the description if it is available
+		// otherwise this will create a $data element with an empty 'description'
+		if(isset($data['description'])) {
+			// sometimes the description contains line breaks and they are then also
+			// shown in this way in the app management which isn't wanted as HTML
+			// manages line breaks itself
+
+			// first of all we split on empty lines
+			$paragraphs = preg_split("!\n[[:space:]]*\n!m", $data['description']);
+
+			$result = [];
+			foreach ($paragraphs as $value) {
+				// replace multiple whitespace (tabs, space, newlines) inside a paragraph
+				// with a single space - also trims whitespace
+				$result[] = trim(preg_replace('![[:space:]]+!m', ' ', $value));
+			}
+
+			// join the single paragraphs with a empty line in between
+			$data['description'] = implode("\n\n", $result);
+		}
+
+		return $data;
+	}
 }
diff --git a/tests/lib/app.php b/tests/lib/app.php
index 1bd350f216a611e80cbc9b0b9d20c1e19535d1e0..0c0eb28b3ba3ec14c215daf948ab2b90a5c5c612 100644
--- a/tests/lib/app.php
+++ b/tests/lib/app.php
@@ -508,5 +508,34 @@ class Test_App extends \Test\TestCase {
 		// Remove the cache of the mocked apps list with a forceRefresh
 		\OC_App::getEnabledApps(true);
 	}
+
+	/**
+	 * Providers for the app data values
+	 */
+	function appDataProvider() {
+		return [
+			[
+				['description' => " \t  This is a multiline \n test with \n \t \n \n some new lines   "],
+				['description' => "This is a multiline test with\n\nsome new lines"]
+			],
+			[
+				['description' => " \t  This is a multiline \n test with \n \t   some new lines   "],
+				['description' => "This is a multiline test with some new lines"]
+			],
+			[
+				['not-a-description' => " \t  This is a multiline \n test with \n \t   some new lines   "],
+				['not-a-description' => " \t  This is a multiline \n test with \n \t   some new lines   "]
+			],
+		];
+	}
+
+	/**
+	 * Test app info parser
+	 *
+	 * @dataProvider appDataProvider
+	 */
+	public function testParseAppInfo($data, $expected) {
+		$this->assertEquals($expected, \OC_App::parseAppInfo($data));
+	}
 }