1
1
Fork 0

Urlencode /network file parameter

This commit is contained in:
Hypolite Petovan 2018-11-23 10:02:30 -05:00
parent 9774fd8be9
commit c23d1b2776
3 changed files with 20 additions and 21 deletions

View file

@ -462,17 +462,17 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ
. "<script> var profile_uid = " . $_SESSION['uid'] . "<script> var profile_uid = " . $_SESSION['uid']
. "; var netargs = '" . substr($a->cmd, 8) . "; var netargs = '" . substr($a->cmd, 8)
. '?f=' . '?f='
. ((x($_GET, 'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET, 'cid')) ? '&cid=' . rawurlencode($_GET['cid']) : '')
. ((x($_GET, 'search')) ? '&search=' . $_GET['search'] : '') . ((x($_GET, 'search')) ? '&search=' . rawurlencode($_GET['search']) : '')
. ((x($_GET, 'star')) ? '&star=' . $_GET['star'] : '') . ((x($_GET, 'star')) ? '&star=' . rawurlencode($_GET['star']) : '')
. ((x($_GET, 'order')) ? '&order=' . $_GET['order'] : '') . ((x($_GET, 'order')) ? '&order=' . rawurlencode($_GET['order']) : '')
. ((x($_GET, 'bmark')) ? '&bmark=' . $_GET['bmark'] : '') . ((x($_GET, 'bmark')) ? '&bmark=' . rawurlencode($_GET['bmark']) : '')
. ((x($_GET, 'liked')) ? '&liked=' . $_GET['liked'] : '') . ((x($_GET, 'liked')) ? '&liked=' . rawurlencode($_GET['liked']) : '')
. ((x($_GET, 'conv')) ? '&conv=' . $_GET['conv'] : '') . ((x($_GET, 'conv')) ? '&conv=' . rawurlencode($_GET['conv']) : '')
. ((x($_GET, 'nets')) ? '&nets=' . $_GET['nets'] : '') . ((x($_GET, 'nets')) ? '&nets=' . rawurlencode($_GET['nets']) : '')
. ((x($_GET, 'cmin')) ? '&cmin=' . $_GET['cmin'] : '') . ((x($_GET, 'cmin')) ? '&cmin=' . rawurlencode($_GET['cmin']) : '')
. ((x($_GET, 'cmax')) ? '&cmax=' . $_GET['cmax'] : '') . ((x($_GET, 'cmax')) ? '&cmax=' . rawurlencode($_GET['cmax']) : '')
. ((x($_GET, 'file')) ? '&file=' . $_GET['file'] : '') . ((x($_GET, 'file')) ? '&file=' . rawurlencode($_GET['file']) : '')
. "'; var profile_page = " . $pager->getPage() . "; </script>\r\n"; . "'; var profile_page = " . $pager->getPage() . "; </script>\r\n";
} }

View file

@ -36,6 +36,6 @@ function filerm_content(App $a)
info('Item was not deleted'); info('Item was not deleted');
} }
$a->internalRedirect('/network?f=&file=' . $term); $a->internalRedirect('/network?f=&file=' . rawurlencode($term));
killme(); killme();
} }

View file

@ -170,16 +170,15 @@ function network_init(App $a)
function saved_searches($search) function saved_searches($search)
{ {
$srchurl = '/network?f=' $srchurl = '/network?f='
. ((x($_GET, 'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET, 'cid')) ? '&cid=' . rawurlencode($_GET['cid']) : '')
. ((x($_GET, 'star')) ? '&star=' . $_GET['star'] : '') . ((x($_GET, 'star')) ? '&star=' . rawurlencode($_GET['star']) : '')
. ((x($_GET, 'bmark')) ? '&bmark=' . $_GET['bmark'] : '') . ((x($_GET, 'bmark')) ? '&bmark=' . rawurlencode($_GET['bmark']) : '')
. ((x($_GET, 'conv')) ? '&conv=' . $_GET['conv'] : '') . ((x($_GET, 'conv')) ? '&conv=' . rawurlencode($_GET['conv']) : '')
. ((x($_GET, 'nets')) ? '&nets=' . $_GET['nets'] : '') . ((x($_GET, 'nets')) ? '&nets=' . rawurlencode($_GET['nets']) : '')
. ((x($_GET, 'cmin')) ? '&cmin=' . $_GET['cmin'] : '') . ((x($_GET, 'cmin')) ? '&cmin=' . rawurlencode($_GET['cmin']) : '')
. ((x($_GET, 'cmax')) ? '&cmax=' . $_GET['cmax'] : '') . ((x($_GET, 'cmax')) ? '&cmax=' . rawurlencode($_GET['cmax']) : '')
. ((x($_GET, 'file')) ? '&file=' . $_GET['file'] : ''); . ((x($_GET, 'file')) ? '&file=' . rawurlencode($_GET['file']) : '');
; ;
$terms = DBA::select('search', ['id', 'term'], ['uid' => local_user()]); $terms = DBA::select('search', ['id', 'term'], ['uid' => local_user()]);