-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
Encoding problems with Mockup Select2 widget #650
Labels
Milestone
Comments
thet
added a commit
to plone/plone.app.widgets
that referenced
this issue
Jun 25, 2015
…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
added a commit
to plone/plone.app.content
that referenced
this issue
Jun 25, 2015
…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
added a commit
to plone/buildout.coredev
that referenced
this issue
Jun 25, 2015
Branch: refs/heads/master Date: 2015-06-25T03:10:04+02:00 Author: Johannes Raggam (thet) <raggam-nl@adm.at> Commit: plone/plone.app.content@9927a52 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 Files changed: M CHANGES.rst M plone/app/content/browser/vocabulary.py M plone/app/content/tests/test_widgets.py Repository: plone.app.content Branch: refs/heads/master Date: 2015-06-25T10:57:01+02:00 Author: Johannes Raggam (thet) <raggam-nl@adm.at> Commit: plone/plone.app.content@62bbf28 Merge pull request #34 from plone/thet-vocabularyencoding Fix encoding problems with Mockup Select2 widget Files changed: M CHANGES.rst M plone/app/content/browser/vocabulary.py M plone/app/content/tests/test_widgets.py
Closed via plone/plone.app.content#34 |
I don't think that fix is correct. It's appropriate for forms to deal with tokens. It sounds like maybe we're missing a widget converter to turn the token back into the corresponding value on the backend when the form is submitted. |
thet
added a commit
to plone/plone.app.z3cform
that referenced
this issue
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
added a commit
to plone/plone.app.content
that referenced
this issue
Nov 24, 2015
…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" This reverts commit 9927a52.
This was referenced Nov 24, 2015
Closed
Hope 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
With plone.app.widgets under Plone 4.3 or the standard Plone 5 installation, the following problem occurs when choosing a value with non-ASCII characters from the vocabulary result presented by the Select 2 widget:
The Subject tag is presented with binary encoded data. That's because the vocabularies token attribute saves it with the
binascii.b2a_qp
function, while value and title are just stored as unicode values.The
@@getVocabulary
fromplone.app.widgets.browser.vocabularies
, resp Plone 5,plone.app.content.browser.vocabularies
uses the token instead of the value.Two pull requests fixing it are underway.
The text was updated successfully, but these errors were encountered: