fix affinity settings, use export var on bbcode destined for ActivityPub recipients to strip out map and embed scripts

This commit is contained in:
zotlabs 2018-10-04 21:16:20 -07:00
parent 9424a7f56b
commit d64e67b18c
4 changed files with 7 additions and 18 deletions

View file

@ -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'

View file

@ -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
));

View file

@ -1,5 +0,0 @@
version: 2
url: https://framagit.org/macgirvin/zap/issues
name: Report Bug
photo: icon:bug
categories: System

View file

@ -1,6 +0,0 @@
version: 1.2
url: $baseurl/cards/$nick
name: Cards
requires: local_channel
photo: icon:list
categories: nav_featured_app, Productivity