From d64e67b18c67487e4918a7b572df7acf6c317930 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 4 Oct 2018 21:16:20 -0700 Subject: [PATCH] fix affinity settings, use export var on bbcode destined for ActivityPub recipients to strip out map and embed scripts --- Zotlabs/Lib/Activity.php | 8 ++++---- Zotlabs/Module/Affinity.php | 6 +++--- app/bugreport.apd | 5 ----- app/cards.apd | 6 ------ 4 files changed, 7 insertions(+), 18 deletions(-) delete mode 100644 app/bugreport.apd delete mode 100644 app/cards.apd diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index b8f0aad70..662115a6e 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -243,8 +243,8 @@ class Activity { if($i['title']) $ret['name'] = $i['title']; if($i['summary']) - $ret['summary'] = bbcode($i['summary']); - $ret['content'] = bbcode($i['body']); + $ret['summary'] = bbcode($i['summary'], [ 'export' => true ]); + $ret['content'] = bbcode($i['body'], [ 'export' => true ]); $ret['source'] = [ 'content' => $i['body'], 'summary' => $i['summary'], 'mediaType' => 'text/bbcode' ]; } @@ -420,12 +420,12 @@ class Activity { } if($i['summary']) { - $ret['summary'] = bbcode($i['summary']); + $ret['summary'] = bbcode($i['summary'], [ 'export' => true ]); } if($ret['type'] === 'Announce') { $tmp = $i['body']; - $ret['content'] = bbcode($tmp); + $ret['content'] = bbcode($tmp, [ 'export' => true ]); $ret['source'] = [ 'content' => $i['body'], 'mediaType' => 'text/bbcode' diff --git a/Zotlabs/Module/Affinity.php b/Zotlabs/Module/Affinity.php index a7d935e1c..c362d7a57 100644 --- a/Zotlabs/Module/Affinity.php +++ b/Zotlabs/Module/Affinity.php @@ -13,7 +13,7 @@ class Affinity extends \Zotlabs\Web\Controller { return; } - if($_POST['affinity_slider-submit']) { + if($_POST['affinity-submit']) { $cmax = intval($_POST['affinity_cmax']); if($cmax < 0 || $cmax > 99) $cmax = 99; @@ -23,7 +23,7 @@ class Affinity extends \Zotlabs\Web\Controller { set_pconfig(local_channel(),'affinity','cmin',$cmin); set_pconfig(local_channel(),'affinity','cmax',$cmax); - info( t('Affinity Slider settings updated.') . EOL); + info( t('Affinity Tool settings updated.') . EOL); } @@ -58,7 +58,7 @@ class Affinity extends \Zotlabs\Web\Controller { )); $s .= replace_macros(get_markup_template('generic_app_settings.tpl'), array( - '$addon' => array('affinity_slider', '' . t('Affinity Tool Settings'), '', t('Submit')), + '$addon' => array('affinity', '' . t('Affinity Tool Settings'), '', t('Submit')), '$content' => $setting_fields )); diff --git a/app/bugreport.apd b/app/bugreport.apd deleted file mode 100644 index 5e19b5eff..000000000 --- a/app/bugreport.apd +++ /dev/null @@ -1,5 +0,0 @@ -version: 2 -url: https://framagit.org/macgirvin/zap/issues -name: Report Bug -photo: icon:bug -categories: System diff --git a/app/cards.apd b/app/cards.apd deleted file mode 100644 index ecc61b7f9..000000000 --- a/app/cards.apd +++ /dev/null @@ -1,6 +0,0 @@ -version: 1.2 -url: $baseurl/cards/$nick -name: Cards -requires: local_channel -photo: icon:list -categories: nav_featured_app, Productivity