Skip to content
Snippets Groups Projects
Commit 43b53cfb authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- 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
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment