We are currently using dfwiki 2006030101, and remarked a bug in the pagename handling: if users puts special characters such as ' or " in their pagenames, these get prefixed by \ in the URL, but this prefix is not stripped inside the code, so it gets appended over and over.
For instance, if you create a page
L'essai
the viewing URL will be like :
view.php?id=5170&page=view/L\\'essai
and fail.
The best solution in my opinion would be to clean the pagenames, by replacing all non alphanumeric or space characters by _.
In reply to Olivier AUBERT
Re: DFwiki: bug with special characters in page names
by Olivier AUBERT -
Here is a proposed patch for the problem of special characters in pagenames:
* in dfwikilib.php, function get_real_pagename, normalize linknames by stripping invalid characters :
* in dfwikilib.php, function get_real_pagename, normalize linknames by stripping invalid characters :
...
$id = ($id)? $id : $dfwiki->id;
// Remove multiple escaping backslashes
$name = stripslashes($name);
// Remove non-alphanumeric/space characters
$name = preg_replace('/[^\w\s]/', '_', $name);
- \w should match alphanumeric characters, and thus correctly handle accented characters if the locale is correctly set on the server. However, if the locale is not correct, it will also replace accented characters by _
- * in wiki/sintax.php: call get_real_pagename in dfwiki_sintax_create_internal_link :
... case 'internal': ...
// Normalize pagename
$linkpage = dfwiki_get_real_pagename($linkpage);
In reply to Olivier AUBERT
Re: DFwiki: bug with special characters in page names
by Ludo (Marc Alier) -
Thank you Olivier...
We'll merge it on the next wiki release ;)
Ciao
Ludo
We'll merge it on the next wiki release ;)
Ciao
Ludo
In reply to Ludo (Marc Alier)
Re: DFwiki: bug with special characters in page names
by Anthony Borrow -
Help, I'm wikifused! I am trying to create a Wiki for FAQs but I do not know how to create the question (page) for: What are virtual and #news folders?
It appears that it is trying to interpret the # character
Similarly, if I wanted brackets to show up how do you use characters that wikis tend to process?
Is there a good guide to Moodle's wiki structure? There seems to be a lack of standardization in usage.
Any pointers that might help me to better understand wikis would be greatly appreciated.
Peace - Anthony
It appears that it is trying to interpret the # character
Similarly, if I wanted brackets to show up how do you use characters that wikis tend to process?
Is there a good guide to Moodle's wiki structure? There seems to be a lack of standardization in usage.
Any pointers that might help me to better understand wikis would be greatly appreciated.
Peace - Anthony
In reply to Anthony Borrow
Re: DFwiki: bug with special characters in page names
by Anthony Borrow -
Perhaps a more specific example would be helpful - what would you type in the html editor in Moodle 1.6 while creating a wiki page to display the following where the numbering is done automatically as part of an ordered list - Even if I have to do manual numbering that is ok but I want the pound sign to appear:
List of FAQs:
1. Question #1
a. Question #1a
b. Question #1b
2. Question #2
List of FAQs:
1. Question #1
a. Question #1a
b. Question #1b
2. Question #2
In reply to Olivier AUBERT
Re: DFwiki: bug with special characters in page names
by Jordi Piguillem -
Yes, we know this bug and nobody take a minute to fix it. Until next release we recomend no to use ', '', + or & in page names.
DFWikiTeam, Pigui.
DFWikiTeam, Pigui.
Oh. Imagine my surprise when the wiki pages our Korean users created would not show up again to be edited by anyone other than the original creator. Ofc they use Korean in the page names.
Everything seems fine when others open the wiki page, the page name displays correctly in korean and so do the contents, but when anyone (not the last editor) else tries to edit that page, the edit screen reads:
Edit this page '?????몰?????를???????'
and there is no content in the html box.
Is there a way around this - bug - i will call it, since the korean page title and contents correctly show up in the View Tab? Must be the way it passes information to the Edit tab. English titled pages do not have the same problem.
I have tried with version 1.6.1, 1.6.2, and even 1.7 and the same error keeps appearing.
In scanning this support column it would seem there are limits to the way this wiki handles utf-8 and/or page titles, so we are trying a workaround for now: short English page names.
If there is no solution to this, then probably the best solution for us will be the use of an english page name (without apostrophes or spaces) and a Korean alias that shows on the page.
Is there a way to accomplish this? I mean, to have the alias show as the hyperlink and not the real page name?
Thanks for helping out a n00b,
Tito Vergara
Everything seems fine when others open the wiki page, the page name displays correctly in korean and so do the contents, but when anyone (not the last editor) else tries to edit that page, the edit screen reads:
Edit this page '?????몰?????를???????'
and there is no content in the html box.
Is there a way around this - bug - i will call it, since the korean page title and contents correctly show up in the View Tab? Must be the way it passes information to the Edit tab. English titled pages do not have the same problem.
I have tried with version 1.6.1, 1.6.2, and even 1.7 and the same error keeps appearing.
In scanning this support column it would seem there are limits to the way this wiki handles utf-8 and/or page titles, so we are trying a workaround for now: short English page names.
If there is no solution to this, then probably the best solution for us will be the use of an english page name (without apostrophes or spaces) and a Korean alias that shows on the page.
Is there a way to accomplish this? I mean, to have the alias show as the hyperlink and not the real page name?
Thanks for helping out a n00b,
Tito Vergara
Thanks for the issue Tito,
we will take a close look. The problem with (we) latin alphabet users is that we use to forget that we are not the only one.
I create a issue in the tracker.
Ludo
we will take a close look. The problem with (we) latin alphabet users is that we use to forget that we are not the only one.
I create a issue in the tracker.
Ludo
Thank you Ludo. I look forward to hearing of a solution. I think we will stick with testing 1.7, as I like its new directions in admin screens.
I run into a similar problem when trying to set up a glossary (Korean/english)... it tries to organize it according to first letter, which in Korean is a two or three letter combination. So, instead of being in the "ㄱ" section, a word will show up in the uncategorized "개" section. Of course, none of this fits within the latin alphabet - so the glossary changes according to the user interface language... an interesting problem.
I will post this or a similar question in the glossary section. No action required.
I run into a similar problem when trying to set up a glossary (Korean/english)... it tries to organize it according to first letter, which in Korean is a two or three letter combination. So, instead of being in the "ㄱ" section, a word will show up in the uncategorized "개" section. Of course, none of this fits within the latin alphabet - so the glossary changes according to the user interface language... an interesting problem.
I will post this or a similar question in the glossary section. No action required.
We are having a technical discussion rigtht now in the general dev forum to solve it..http://moodle.org/mod/forum/discuss.php?d=55199#251660
Regards
Ludo
Regards
Ludo