Skip to content
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

Merged
merged 1 commit into from
Jun 25, 2015

Conversation

thet
Copy link
Member

@thet thet commented Jun 25, 2015

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

…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
@thet
Copy link
Member Author

thet commented Jun 25, 2015

@vangheem ^^

@vangheem
Copy link
Member

Looks fine to me. Please merge yourself. I'm on the road. :)
On Jun 24, 2015 8:19 PM, "Johannes Raggam" notifications@github.com wrote:

@vangheem https://github.com/vangheem ^^


Reply to this email directly or view it on GitHub
#34 (comment)
.

@thet
Copy link
Member Author

thet commented Jun 25, 2015

Waiting for test results: http://jenkins.plone.org/job/pull-request-5.0/32/

thet added a commit that referenced this pull request Jun 25, 2015
Fix encoding problems with Mockup Select2 widget
@thet thet merged commit 62bbf28 into master Jun 25, 2015
@thet thet deleted the thet-vocabularyencoding branch June 25, 2015 08:57
@davisagli
Copy link
Member

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...

@vangheem
Copy link
Member

vangheem commented Jul 9, 2015

@thet have you seen @davisagli's comment? It seems like this needs to be reverted.

@thet
Copy link
Member Author

thet commented Jul 9, 2015

@vangheem no, didn't! thanks for the pointer. i have to revisit this issue later.

@thet
Copy link
Member Author

thet commented Nov 22, 2015

^^^ not right. It really must be the data converter. Will fix in 9hrs, when I'm online again

thet added a commit to plone/plone.app.z3cform that referenced this pull request Nov 24, 2015
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
@thet
Copy link
Member Author

thet commented Nov 24, 2015

This fixes it: plone/plone.app.z3cform#34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants