Changeset 20741


Ignore:
Timestamp:
Feb 13, 2013, 7:12:10 PM (11 years ago)
Author:
flop25
Message:

bug:2845
use of \ to escape the comma
"a, b\, 1" will give Array ( [0] => a [1] => b, 1 ) whatever the number of \

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/ws_functions.inc.php

    r19703 r20741  
    19781978  {
    19791979    $tag_ids = array();
    1980     $tag_names = explode(',', $params['tags']);
     1980    $tag_names = preg_split('~(?<!\\\),~', $params['tags']);
    19811981    foreach ($tag_names as $tag_name)
    19821982    {
    1983       $tag_id = tag_id_from_tag_name($tag_name);
     1983      $tag_id = tag_id_from_tag_name(preg_replace('#\\\\*,#', ',', $tag_name));
    19841984      array_push($tag_ids, $tag_id);
    19851985    }
Note: See TracChangeset for help on using the changeset viewer.