diff --git a/lib/app.php b/lib/app.php
index 84d17957def88132fae3c309f468866b759a04df..b337c55ec605864f09c1d906fa48fc337983267d 100755
--- a/lib/app.php
+++ b/lib/app.php
@@ -381,7 +381,7 @@ class OC_App{
 		$file= self::getAppPath($appid).'/appinfo/version';
 		$version=@file_get_contents($file);
 		if($version){
-			return $version;
+			return trim($version);
 		}else{
 			$appData=self::getAppInfo($appid);
 			return $appData['version'];