From a8fd86946ec42e618cc9737d826e3db0967d06bb Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 12 Aug 2011 09:40:09 -0400 Subject: [PATCH] - Patch #1078398 by xjm, BayerMeister: Fixed taxonomy_implode_tags() modifies term objects (instead of cloning) and adds extra ' when called multiple times. --- modules/taxonomy/taxonomy.module | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 946c5e4a7f2..eb81870f998 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; } } }