aboutsummaryrefslogtreecommitdiffstats
path: root/include/apps.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-05-18 20:00:30 -0700
committerfriendica <info@friendica.com>2014-05-18 20:00:30 -0700
commitea67b9bda895d30d3115b04ba78db35e6a8b0a74 (patch)
tree3e272efd82d3dd0f8f5a2dafab676a4be062a4b0 /include/apps.php
parent466fe725bc056ad7ed2c3bf24783b65565293472 (diff)
downloadvolse-hubzilla-ea67b9bda895d30d3115b04ba78db35e6a8b0a74.tar.gz
volse-hubzilla-ea67b9bda895d30d3115b04ba78db35e6a8b0a74.tar.bz2
volse-hubzilla-ea67b9bda895d30d3115b04ba78db35e6a8b0a74.zip
apps: fix encoding/decoding and chunk splitting
Diffstat (limited to 'include/apps.php')
-rw-r--r--include/apps.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/apps.php b/include/apps.php
index ac6f34ee5..109da2454 100644
--- a/include/apps.php
+++ b/include/apps.php
@@ -153,7 +153,7 @@ function app_list($uid) {
function app_decode($s) {
- $x = base64_decode($s);
+ $x = base64_decode(str_replace(array('<br />',"\r","\n",' '),array('','','',''),$s));
return json_decode($x,true);
}
@@ -249,6 +249,6 @@ function app_encode($app) {
$ret['page'] = $app['app_page'];
$j = json_encode($ret);
- return '[app]' . base64_encode($j) . '[/app]';
+ return '[app]' . chunk_split(base64_encode($j),72,"\n") . '[/app]';
} \ No newline at end of file