Opened 15 years ago

Last modified 10 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 Christopher Allan Webber)

Tagging (#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:1 by Caleb Davis, 15 years ago

oops, *"Feel fix this..." = "Feel free to fix this..."

comment:2 by Aaron Williamson, 14 years ago

Owner: set to Elvenlord Elrond
Status: NewFeedback

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/copiesofcopies/mediagoblin/copiesofcopies-mediagoblin/commits/feature454_quoted_tags](https://gitorious.org/copiesofcopies/mediagoblin/copiesofcopies-mediagoblin/commits/feature454_quoted_tags)

comment:3 by Aaron Williamson, 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 Elrond, 14 years ago

Owner: changed from Elvenlord Elrond to Aaron Williamson
Status: FeedbackIn 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 Will Kahn-Greene, 14 years ago

The original url for this bug was http://bugs.foocorp.net/issues/454 .
Relations:
#75: blocked

comment:6 by Christopher Allan Webber, 13 years ago

Description: modified (diff)
Owner: Aaron Williamson 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.