From 960bbbbcfcd1056af4ef59222af6572cd449b32e Mon Sep 17 00:00:00 2001 From: Benjamin Esham Date: Sat, 26 May 2018 19:04:18 -0700 Subject: [PATCH] Use Tokenfield to break up the input (fixes #95) The csv_to_array function breaks on commas *and* spaces, but the Tokenfield-based UI is set up so that tags may contain spaces. Fortunately Tokenfield includes a function to break the field into an array for you, so I just used that function instead. (This patch has not been tested.) --- views/new-post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/new-post.php b/views/new-post.php index 030ca61..c03bb5b 100644 --- a/views/new-post.php +++ b/views/new-post.php @@ -689,7 +689,7 @@ $(function(){ syndications.push($(btn).data('syndicate-to')); }); - var category = csv_to_array($("#note_category").val()); + var category = $("#note_category").tokenfield("getTokens"); var formData = new FormData(); var entry = {};