Problem/Motivation
There's 7 usages in CORE using same code to encode the Tags. We copy and paste it over and over again. It makes hard to maintain the code. And less possible to add custom encode rule to the Tags.
Proposed resolution
Add a shared method to \Drupal\Component\Utility\Tags class
Remaining tasks
- Review patch
User interface changes
- N / A
API changes
- added a new method in \Drupal\Component\Utility\Tags class
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | interdiff_do-not-test.patch | 517 bytes | droplet |
| #10 | tags-encode-10.patch | 8.2 KB | droplet |
Comments
Comment #1
amateescu commentedThis makes perfect sense.
The function receives a string, not an array :) And the text might be changed to "A tag string."
Comment #3
droplet commentedFixed the errors
Comment #5
droplet commentedremove extra end quote
Comment #7
droplet commentedIt should work this time.
Comment #8
droplet commentedComment #9
amateescu commentedPlease see #1. Also, the method description should be something like:
Encodes a tag string, taking care of special cases like commas and quotes.Comment #10
droplet commentedUpdate the comments.
Comment #11
amateescu commentedLooks good now.
Comment #12
catchCommitted/pushed to 8.x, thanks!
Could use a change record for the API addition.
Comment #13
jessebeach commentedChange record added and reviewed. This was a simple API method addition.
Comment #14
jessebeach commented