Re: [Django] #30551: urlize on URL with incomplete query string adds equal sign.

2019-06-07 Thread Django
#30551: urlize on URL with incomplete query string adds equal sign.
---+--
 Reporter:  jochengcd  |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Utilities  |  Version:  master
 Severity:  Normal |   Resolution:  wontfix
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by felixxm):

 * status:  new => closed
 * type:  Uncategorized => Bug
 * resolution:   => wontfix


Comment:

 It seems that a patch is not feasible with the current implementation that
 uses `parse_qsl()`, because
 {{{
 >>> parse_qsl('a', keep_blank_values=True)
 [('a', '')]
 >>> parse_qsl('a=', keep_blank_values=True)
 [('a', '')]
 }}}
 so would have to add a special workaround for this single case, what is
 not worth it.

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.09002e80dbc263abeaf3c1012581ce3f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30551: urlize on URL with incomplete query string adds equal sign. (was: urlize on URL with incomplete query string adds equal sign)

2019-06-07 Thread Django
#30551: urlize on URL with incomplete query string adds equal sign.
---+--
 Reporter:  jochengcd  |Owner:  nobody
 Type:  Uncategorized  |   Status:  new
Component:  Utilities  |  Version:  master
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by felixxm):

 * version:  1.11 => master
 * component:  Uncategorized => Utilities


Comment:

 Thanks for the report.
 
[https://github.com/django/django/blob/c498f088c584ec3aff97409fdc11b39b28240de9/django/utils/html.py#L220-L223
 smart_urlquote()] adds a trailing equal sign. I noticed that `parse_qsl()`
 raises:
 {{{
   File "/usr/lib/python3.6/urllib/parse.py", line 693, in parse_qsl
 raise ValueError("bad query field: %r" % (name_value,))
 ValueError: bad query field: '284309'
 }}}
 when we add `strict_parsing=True` flag, hence I believe that query string
 used by this site is incorrect. I'm not sure that we should handle this
 case in Django.

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.47c13844734e4d3ec11d16819a63d90b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.