diff options
Diffstat (limited to 'modules/taxonomy.module')
-rw-r--r-- | modules/taxonomy.module | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/taxonomy.module b/modules/taxonomy.module index d7a0c244d..150acf060 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -206,8 +206,10 @@ function taxonomy_save_term($edit) { // synonyms (very cool idea indeed) db_query("DELETE FROM term_synonym WHERE tid = '%d'", $edit["tid"]); if ($edit["synonyms"]) { - foreach (explode ("\n", $edit["synonyms"]) as $synonym) { - db_query("INSERT INTO term_synonym (tid, name) VALUES ('%d', '%s')", $edit["tid"], chop($synonym)); + foreach (explode ("\n", str_replace("\r", "", $edit["synonyms"])) as $synonym) { + if ($synonym) { + db_query("INSERT INTO term_synonym (tid, name) VALUES ('%d', '%s')", $edit["tid"], chop($synonym)); + } } } |