This is related to bug:569 that I helped DRollingKearney sort out (and then I marked the bug as completed).
I just discovered that the same special characters cause the link syntax to break. I'm trying to create a ListPages module that creates links to the words in the dictionary. The dictionary is built using dataforms and I want to use the dictionary word (entered into one of the form fields) as the link text to the page like this:
[[module ListPages ...]]
[/%%fullname%% %%form_raw{pagetitle}%%]
[[/module]]
However, it does not work if the {pagetitle} has a word with some special characters. For example, abaiyạchi, which is entered in the field as:
abaiy@<ạ>@chi
I've tried different forms of the link syntax and none of them work:
[[[choctaw:1 | abaiy@<ạ>@chi]]]
[/choctaw:1 abaiy@<ạ>@chi]
[http://choctaw.wikidot.com/choctaw:1 abaiy@<ạ>@chi]
[[[choctaw:1 | abaiyạchi]]]
[/choctaw:1 abaiyạchi]
[http://choctaw.wikidot.com/choctaw:1 abaiyạchi]
My workaround is to use:
%%form_raw{pagetitle}%% ([/%%fullname%% view])
which renders as:
abaiyạchi (view)
It works, but it's ugly, especially when there will be hundreds of words listed.
Can this be fixed?
I forgot to mention that in order to use the special characters, the form field has to be a wiki type. I suspect this complicates using these words as link text.
After thinking about this some more, I came up with a nice workaround. I created a transparent GIF image to overlay on top of the form field text and attached the link to the image.
Community Admin
Apart from the fact that our wiki parser generates garbage when it meets wiki syntax within text links, I think you are doing it the wrong way.
If I understand you correctly, you are "encoding" special characters by using wiki syntax for escaping.
Later, when this is used in wiki page, especially within other elements like links, the parser gets confused.
Why don't you just enter special characters as normal UTF characters? Although I have not explored how to do this efficiently, it looks like there are numbers of solutions to conveniently insert special characters directly into the input form.
Michał Frąckowiak @ Wikidot Inc.
Visit my blog at michalf.me
We have updated the parser so that it does not produce unexpected garbage. We also had a patch to make your examples render as you would expected, but allowing wiki syntax within link description opens a way for more unexpected behavior, so we decided (sorry about that) it will not be deployed.
Michał Frąckowiak @ Wikidot Inc.
Visit my blog at michalf.me
Thanks for taking the time to dig into this. I suspected using wiki syntax for link text would create problems for the parser. I'm going to try to find a simple way to type these characters using the keyboard or some easy to use utility.
Community Admin