Hi I am using D6 +i18n, both at latest version.
I am reporting this problem in the page where you are allowed to select a node to be the translation of another node. The path is
/node/[nid]/translate
Specifically in the autocomplete widget. If i have a node with an apostrophe in the title, by example
John's node
I start to type the first letters so that the autocomplete dropdown appears, then when I click on the node I need, the apostrophe is changed into an html entity, so it becomes:
John's node
Then if I try to submit with the update translation button, I get the error "Node title mismatch. Please check your selection".
I do not know if it is related to i18n or geneically to the autocomplete widget of drupal.
GP
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | i18n_autocomplete_encoding_bug-D6.patch | 1.03 KB | hass |
Comments
Comment #1
hass commentedThis is a bug of _i18n_node_references() that encodes the string for HTML and drupal_json() does it again with drupal_to_js().
I removed the check_plain() on node->title and changed the array key to 'title_raw' to make sure nobody reuses the variable somewhere else without check_plain'ing or drupal_to_js'ify it.
@Jose: What do you think?
Comment #2
hass commentedComment #3
jose reyero commentedLooks good, and anyway it's what nodereference module does, so we'll trust that. Thanks.