mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
* dont restrict some chracters in tag names (/\<'>&")
This commit is contained in:
parent
291708692b
commit
5b4253d6f0
3 changed files with 5 additions and 5 deletions
|
|
@ -661,7 +661,7 @@ function prepareTags($tagsStr)
|
|||
$aTags = array('tags'=>array(), 'ids'=>array());
|
||||
foreach($tags as $tag)
|
||||
{
|
||||
$tag = str_replace(array('"',"'",'<','>','&','/','\\','^','#'),'',trim($tag));
|
||||
$tag = str_replace(array('^','#'),'',trim($tag));
|
||||
if($tag == '') continue;
|
||||
|
||||
$aTag = getOrCreateTag($tag);
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ function htmlarray_ref(&$a, $exclude=null)
|
|||
foreach($a as $k=>$v)
|
||||
{
|
||||
if(is_array($v)) $a[$k] = htmlarray($v, $exclude);
|
||||
elseif(!$exclude) $a[$k] = htmlspecialchars($v);
|
||||
elseif(!in_array($k, $exclude)) $a[$k] = htmlspecialchars($v);
|
||||
elseif(!$exclude) $a[$k] = htmlspecialchars($v ?? '');
|
||||
elseif(!in_array($k, $exclude)) $a[$k] = htmlspecialchars($v ?? '');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1593,7 +1593,7 @@ function editTask(id)
|
|||
form.task.value = item.titleText;
|
||||
form.note.value = item.noteText;
|
||||
form.id.value = item.id;
|
||||
form.tags.value = item.tags.split(',').join(', ');
|
||||
form.tags.value = dehtml(item.tags).split(',').join(', ');
|
||||
form.duedate.value = item.duedate;
|
||||
form.prio.value = item.prio;
|
||||
$('#taskedit_id').text('#' + item.id);
|
||||
|
|
@ -2297,7 +2297,7 @@ function isParentId(el, id)
|
|||
|
||||
function dehtml(str)
|
||||
{
|
||||
return str.replace(/"/g,'"').replace(/</g,'<').replace(/>/g,'>').replace(/&/g,'&');
|
||||
return str.replace(/"/g, '"').replace(/'/g, "'").replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&');
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue