Commit 43b53cfb authored by Dries's avatar Dries

- Patch #1078398 by xjm, BayerMeister: Fixed taxonomy_implode_tags() modifies...

- Patch #1078398 by xjm, BayerMeister: Fixed taxonomy_implode_tags() modifies term objects (instead of cloning) and adds extra ' when called multiple times.
parent cb6bc853
......@@ -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;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment