-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix encoding problems with Mockup Select2 widget #34
Conversation
…n for the id in the result set. The token is binary encoded and leads to encoding errors when selecting a value with non-ASCII data from vocabulary list in a select2 based widget. Fixes: plone/Products.CMFPlone#650
@vangheem ^^ |
Looks fine to me. Please merge yourself. I'm on the road. :)
|
Waiting for test results: http://jenkins.plone.org/job/pull-request-5.0/32/ |
Fix encoding problems with Mockup Select2 widget
This does not look right to me. zope.schema requires that a token be 7-bit ASCII, so you should not run into encoding errors...maybe there is something wrong with your vocabulary? Using the value here is definitely not correct; the value of a vocabulary could be anything. The value could contain non-ASCII characters and does not even have to be a string! Might not be serializable even... |
@thet have you seen @davisagli's comment? It seems like this needs to be reverted. |
@vangheem no, didn't! thanks for the pointer. i have to revisit this issue later. |
^^^ not right. It really must be the data converter. Will fix in 9hrs, when I'm online again |
Fix ``AjaxSelectWidgetConverter`` to decode quoted-printable encoded ascii strings back to unicode. The Select2 based AjaxSelectWidget returned the ids which are vocabulary tokens instead of the text. Fixes messed up characters when selecting tags with non-ASCII characters. Fixes: plone/Products.CMFPlone#650 - makes obsolete: plone/plone.app.content#34
This fixes it: plone/plone.app.z3cform#34 |
Let
@@getVocabulary
return the vocabulary's value instead of the token for the id in the result set. The token is binary encoded and leads to encoding errors when selecting a value with non-ASCII data from vocabulary list in a select2 based widget. Fixes: plone/Products.CMFPlone#650