Opened 14 years ago
Last modified 9 years ago
#162 accepted enhancement
add quoting support to tagging — at Version 6
| Reported by: | Caleb Davis | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | programming | Keywords: | |
| Cc: | Parent Tickets: |
Description (last modified by )
Tagging (`#360 </issues/360>`_) needs to be iterated on. This
ticket addresses support for quoting. What are the expected
behaviors? In the following examples, user input is underlined, and
resulting tags are indented.
- In the simple case (assuming comma-delimited text), the user has
a single pair of quotes embedded within the input, such as:
meta,'yo dawg, I heard you like delimiters...',humor
u'meta'
u'yo dawg, I heard you like delimiters...'
u'humor'
- what about mixed quotes? (eg user wants *you're* in the tag)
meme,"I don't even...",humor
u'meme'
u'I don't even'
u'humor'
- then, as Will noted in IRC, some users may wish to tag using xml
or hierarchical organization schemes. At what point does supporting
quoting become complex enough to warrant using a plugin?
**tl;dr - introduce support for tag delimiter(s) within a tag. Efforts towards native gmg support go here. Add a new ticket for plugin work**
Feel fix this ticket if I'm missing the point or the point is not
clear.
Change History (6)
comment:2 by , 14 years ago
| Owner: | set to |
|---|---|
| Status: | New → Feedback |
Updated convert\_to\_tag\_list\_of\_dicts to use shlex to parse tag strings. Now a tag with quotes around it will be treated as one tag, even if it contains commas. Branch: [https://gitorious.org/\ :sub:`copiesofcopies/mediagoblin/copiesofcopies-mediagoblin/commits/feature454\_quoted\_tags](https://gitorious.org/`\ copiesofcopies/mediagoblin/copiesofcopies-mediagoblin/commits/feature454\_quoted\_tags)
comment:3 by , 14 years ago
Also: this patch supports single quotes/apostrophes in tags wrapped in double-quotes, but I'm not sure how to write the test for this.
comment:4 by , 14 years ago
| Owner: | changed from to |
|---|---|
| Status: | Feedback → In Progress |
Already looks quite good! I think ``media_tags_as_string()`` does not yet handle this properly. This especially affects the "edit media" page.
comment:5 by , 14 years ago
The original url for this bug was http://bugs.foocorp.net/issues/454 .
Relations:
#75: blocked
comment:6 by , 13 years ago
| Description: | modified (diff) |
|---|---|
| Owner: | removed |
This ticket hasn't been worked on for some while so I'm removing the claim!
Note:
See TracTickets
for help on using tickets.
