aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ws_functions.inc.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php
index c0a0be246..73f8e9942 100644
--- a/include/ws_functions.inc.php
+++ b/include/ws_functions.inc.php
@@ -2620,7 +2620,17 @@ SELECT *
// and now, let's create tag associations
if (isset($params['tag_ids']))
{
- $tag_ids = explode(',', $params['tag_ids']);
+ $tag_ids = array();
+
+ foreach (explode(',', $params['tag_ids']) as $candidate)
+ {
+ $candidate = trim($candidate);
+
+ if (preg_match(PATTERN_ID, $candidate))
+ {
+ $tag_ids[] = $candidate;
+ }
+ }
if ('replace' == $params['multiple_value_mode'])
{