I came across this Issue.

I have a content type, with an english name : Quiz Direction
I translated it to : Objet d'accompagnement

When navigato to the node add form, the title is html encoded : Créer 'Objet d'accompagnement'

I found out that Drupal's check_plain was executed 2 times on Objet d'accompagnement that prevent it from displaying correctly.

On line 521 of file i18n_node.module, there's a call to i18n_node_translate_type() which apply check_plain on the content type name and this call is wrapped in a t() and the placeholder '@name' execute another check_plain on the content type name.

I think the placeholder should not check anything since i18n_node_translate_type() seems to already have done that.

I made a patch that change the placeholder from '@name' to '!name', but it is also necessary to change the translation.

Comments

emman31’s picture

Actually, the same happens for node edit.

klausi’s picture

Status: Active » Needs work

Patch does not apply, see http://drupal.org/node/707484

emman31’s picture

Status: Needs work » Needs review
StatusFileSize
new1.46 KB

Thanks for the help, here is one that should work.

jose reyero’s picture

Status: Needs review » Needs work

This may work though just taking out filtering -and adding 2 new strings to translate- doesn't look good to me. What we need to do is to use the $options['sanitize'] = FALSE parameter from i18n_string_translate()

gaëlg’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new1.86 KB
jose reyero’s picture

StatusFileSize
new2.73 KB

Patch is ok. However I'm thinking why not for 'edit' too? And why not reusing the (your patch fixes it too) i18n_node_type_name() function?

Please give a try to this one.

guillaumeduveau’s picture

Version: 7.x-1.8 » 7.x-1.x-dev
StatusFileSize
new635 bytes
new3.18 KB

Patch #06 is great.
We also have to do the same for the message displayed after a node submission, see interdiff and patch.

jose reyero’s picture

Status: Needs review » Fixed

This looks ok, committed latest patch by @guix

Thanks everybody.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.