#32649: django.contrib.admin.ModelAdmin.search_fields crashes for a search term
with three quotes
-------------------------------+--------------------------------------
     Reporter:  Dlis           |                    Owner:  nobody
         Type:  Bug            |                   Status:  new
    Component:  contrib.admin  |                  Version:  3.2
     Severity:  Normal         |               Resolution:
     Keywords:  admin, search  |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------

Comment (by Dlis):

 The bag can be reproduced by the following way:

 {{{
 from django.utils.text import smart_split
 from django.utils.text import unescape_string_literal

 search_term = 'Foo "Bar "Baz"'
 parts = list(smart_split(search_term))
 unescape_string_literal(parts[1])
 }}}

 Result is {{{ValueError: Not a string literal: '"Bar "Baz'}}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32649#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.49f657694f879e97be493eebc3f146a5%40djangoproject.com.

Reply via email to