}
}
$tags = ['title' => DI::l10n()->t('Tags: '), 'tags' => $tag_arr];
- if ($cmd === 'edit') {
+ if ($cmd === 'edit' && !empty($tag_arr)) {
$tags['removeanyurl'] = 'post/' . $link_item['id'] . '/tag/remove?return=' . urlencode(DI::args()->getCommand());
$tags['removetitle'] = DI::l10n()->t('[Select tags to remove]');
}
protected function content(array $request = []): string
{
- $returnUrl = hex2bin($request['return'] ?? '');
+ $returnUrl = $request['return'] ?? '';
if (!$this->session->getLocalUserId()) {
$this->baseUrl->redirect($returnUrl);
if ($tag_text === '') {
$this->baseUrl->redirect($returnUrl);
}
-
+
$tags = explode(',', $tag_text);
$tag_checkboxes = array_map(function ($tag_text) {
],
'$item_id' => $item_id,
- '$return' => $returnUrl,
+ '$return' => urlencode($returnUrl),
'$tag_checkboxes' => $tag_checkboxes,
]);
}