#17386: Validation & Unicode Character 'ZERO WIDTH SPACE' (U+200B)
-------------------------------+--------------------------------------
     Reporter:  pennersr       |                    Owner:  nobody
         Type:  Uncategorized  |                   Status:  closed
    Component:  Forms          |                  Version:  1.3
     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 aaugustin):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 Upon further thought, I don't believe this qualifies as a bug in Django. I
 don't see enough reasons to justify special casing `\u200b`, and I don't
 think Django can do something that will fit everyone.

 In order to resolve this problem in your project, you can:
 - add a `clean_email` method in your form that does `cleaned_data['email']
 = cleaned_data['email'].replace('\u200b', '')`
 - run a batch cleanup of your data : `for obj in MyModel.objects.all():
 obj.email = obj.email.replace('\u200b', ''); obj.save()`

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17386#comment:5>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to