Switching between WYSIWYG and wiki editor add characters

Hello,

When we use WYSIWYG editor some annoying characters are added in the content…

ie it is annoying in XWiki.TranslationDocumentClass…

I couldn’t understand why my app displayed ## at the end of my messages…

If you have this wiki content in a translation document page:

## Groupe de la recherche
FormSQM.platform.search.suggestNomFiche=Nom des fiches SMQ

##Process de validation d'un seul onglet:
FormSMQ.CommonS.LibelBtnCheckTab=Valider l’onglet "{1}" et en informer les pilotes du processus {0}
FormSMQ.CheckPart.DocValiD=Le mail d’information à propos de la demande ** {0} ** a été envoyé.
FormSMQ.CheckPart.MailSent=Un mail d’information a été envoyé aux pilotes du processus {0} :

## Process de validation ##
FormSMQ.CommonS.LibelBtnValid=Clore le formulaire et en informer les pilotes du processus {0}
FormSMQ.CommonS.LibelBtnClore=Clore {1} et en informer les autres pilotes du processus {0}

when you use WYSIWYG editor, some ## characters are added like this:

## Groupe de la recherche
FormSQM.platform.search.suggestNomFiche=Nom des fiches SMQ##

##Process de validation d'un seul onglet:
FormSMQ.CommonS.LibelBtnCheckTab=Valider l’onglet "{1}" et en informer les pilotes du processus {0}
FormSMQ.CheckPart.DocValiD=Le mail d’information à propos de la demande ** {0} ** a été envoyé.
FormSMQ.CheckPart.MailSent=Un mail d’information a été envoyé aux pilotes du processus {0} :##

## Process de validation ##
FormSMQ.CommonS.LibelBtnValid=Clore le formulaire et en informer les pilotes du processus {0}
FormSMQ.CommonS.LibelBtnClore=Clore {1} et en informer les autres pilotes du processus {0}

Then I muste take care to “close” ## lines since CKEditor.

I don’t know if I must create a new JIRA issue.

Pascal BASTIEN

We usually use plain/1.0 as syntax for translation documents since that’s actually the closest to what they are. Also it does not make much sense to edit those with the WYSIWYG.

The behavior you have is because when you have xwiki/2.1 syntax for those documents they are parsed as wiki syntax and ## is not a comment in wiki syntax. The ## is added because it’s “fixed” by the parser which automatically close opened syntax.

Yes of course, but usualy, I use Ctrl+G, to find my page and click on Edit … and swich to xwiki editor mode but too late: because ## attack.
But now I know that.

I will convert my translation doc in plain/1.0 then…