in taxonomy_autocomplete: https://api.drupal.org/api/drupal/modules!taxonomy!taxonomy.pages.inc/function/taxonomy_autocomplete/6 we have the following code:
// Commas and quotes in terms are special cases, so encode 'em.
if (strpos($tag->name, ',') !== FALSE || strpos($tag->name, '"') !== FALSE) {
$n = '"' . str_replace('"', '""', $tag->name) . '"';
}
Imagine we have the taxonomy term which is exactly the following string:
George "madcow" Stewart
THe above code would cause the taxonomy autocomplete to display:
"George ""madcow"" Stewart"
I have re-implemented the taxonomy_autocomplete in order to work with a single term (no comma separated list of terms allowed).
The problem now is that when we want to enter George "madcow" Stewart
, a new term "George ""madcow"" Stewart"
is created, including all the extra quotes!
I cannot find where and how in core the escape quotes are stripped before insertion to the database…