diff options
author | Dries Buytaert <dries@buytaert.net> | 2011-08-12 09:40:09 -0400 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2011-08-12 09:40:09 -0400 |
commit | a8fd86946ec42e618cc9737d826e3db0967d06bb (patch) | |
tree | 07aa4767243f93e48b6a38cc880f7760fef88106 /modules/taxonomy | |
parent | b434559af59c78d0f7007fad5431ce19abde76d4 (diff) | |
download | brdo-a8fd86946ec42e618cc9737d826e3db0967d06bb.tar.gz brdo-a8fd86946ec42e618cc9737d826e3db0967d06bb.tar.bz2 |
- Patch #1078398 by xjm, BayerMeister: Fixed taxonomy_implode_tags() modifies term objects (instead of cloning) and adds extra ' when called multiple times.
Diffstat (limited to 'modules/taxonomy')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 946c5e4a7..eb81870f9 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -1236,10 +1236,11 @@ function taxonomy_implode_tags($tags, $vid = NULL) { if (isset($tag->name)) { // Commas and quotes in tag names are special cases, so encode 'em. if (strpos($tag->name, ',') !== FALSE || strpos($tag->name, '"') !== FALSE) { - $tag->name = '"' . str_replace('"', '""', $tag->name) . '"'; + $typed_tags[] = '"' . str_replace('"', '""', $tag->name) . '"'; + } + else { + $typed_tags[] = $tag->name; } - - $typed_tags[] = $tag->name; } } } |