Allow commas in tag names
|Reported by:||mdawaffe||Owned by:|
|Severity:||normal||Keywords:||has-patch needs-testing needs-unit-tests|
Adding tags to posts via the web interface involves a lot of what boils down to
explode( ',', join( ',', array( $tag_name, ... ) ) );
both in PHP and JS.
We settled on commas so we could have tags with spaces in them (see #10320, for example).
It'd be nice if tags (and other taxonomies) could have commas in them, though. Example use case: normalized locations ("Portland, OR"). Admittedly, commas in tag names is an edge case.
The attached treats tag inputs as "real" CSV strings instead of just exploding by commas.
That way, you can enter:
hello, "hello, world"
in the tags input field and the following tags would be added to the post.
- hello, world
This addresses commas in tag names but makes entering double quotes in tag names more annoying. If you wanted a tag named double"quote, you'd have to enter the following.
This may also help with #7897.