Plugin Directory

Changeset 1299091


Ignore:
Timestamp:
12/02/2015 02:52:54 PM (10 years ago)
Author:
NCAllen
Message:

Can now add escaped commas

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bulk-term-generator/trunk/views/admin/js/bulk-term-generator-admin.js

    r1163764 r1299091  
    358358            // Seperate terms by comma, and trim the white space
    359359            for (var i = 0; i < terms.length; i++) {
    360 
    361                 processedTerms.push($.map(terms[i].split(','), $.trim));
     360                console.log(terms[i].match(/([^,]+),([^,]+),(.*)/));
     361                var terms_array = terms[i].replace( '\\,', '{COMMA}' ).split(',').map(function(v){return v.replace('{COMMA}',',');});
     362                terms_array = $.map(terms_array, $.trim);
     363                processedTerms.push(terms_array);
    362364            }
    363365
Note: See TracChangeset for help on using the changeset viewer.