Hi Vincent,
I found a work-around (at least it was ok for me).
I create a new macros, and then just used the macro in the pages: since
the "_" character is now in the macro, is not changed when the page is
edited in the WYSIWYG mode.
Vito
Vincent Massol wrote:
> Hi Vito,
>
> On Oct 17, 2007, at 7:36 AM, Vitantonio Messa wrote:
>
>> Hi everyone,
>>
>> I wrote a page with some code in it:
>>
>> ....SOME TEXT...
>> #foreach ($docum in $xwiki.getSpaceDocsName("workgroups"))
>> #set ($name = $xwiki.split($docum,"_"))
>> #set ($isMeeting = 0)
>> #set ($i = 0)
>> #foreach ($word in $name)
>> #set ($i = $i+1)
>> #if (($i == 1) && ($word == "MT"))
>> #set ($isMeeting = 1)
>> #elseif ($i == 2)
>> #set ($date = $word)
>> #elseif (($i == 3) && (("WG_"+$word) == $doc.getName()))
>> Meeting [$date>workgroups.$docum] <br/>
>> #end
>> #end
>> #end
>> ....SOME TEXT...
>>
>> If I edit the page in wiki-mode, no problem. But if I edit the page in
>> WYSIWYG-mode, and then save it, the code is not working anymore.
>> Actually the same section become:
>>
>> ....SOME TEXT...
>> #foreach ($docum in $xwiki.getSpaceDocsName("workgroups"))
>> #set ($name = $xwiki.split($docum,"_"))
>> #set ($isMeeting = 0)
>> #set ($i = 0)
>> #foreach ($word in $name)
>> #set ($i = $i+1)
>> #if (($i == 1) && ($word == "MT"))
>> #set ($isMeeting = 1)
>> #elseif ($i == 2)
>> #set ($date = $word)
>> #elseif (($i == 3) && (("WG_"+$word) == $doc.getName()))
>>
>> Meeting [$date>workgroups.$docum] \\
>> #end
>> #end
>> #end
>> ....SOME TEXT...
>>
>>
>> So, the character '_' is replace by '_'.
>> Any solution to this problem? Thanks!
>
> Unfortunately I think this was a regression done in 1.1 in the
> WYSIWYG editor. It seems it's no longer working whenever there are
> HTML tags or special characters that it encodes... :( It used to work
> fine.
>
> We need to fix this ASAP. I'm personally not familiar with the code
> so if anyone wants to have a go please feel free.
>
> Thanks
> -Vincent
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users