From: Arno H. <aho...@in...> - 2000-12-06 11:18:36
|
> > During my efforts to get this done I noticed a minor bug in the > > function ExtractWikiPageLinks. If you have something in your text like > > "[[not a link]" then the page name "[not a link" is extracted as a link > > name and turns up, for example, in MySQL in the table wikilinks. My > > patch also fixes this. > > Confirmed on my Postgresql installation... nice catch! This bug has been fixed since stdlib.php v1.12 from November 16th. Are you sure you tested the latest build? If you are using an existing database there still might be some of those links in there - they should go away after loading/saving the page. While verifying this, I discovered that I didn't include another bugfix I have had in my local wiki for some time. I have committed it now. From the log: :: fixed another bug in ExtractWikiPageLinks(): wiki-unknown-named was not :: recognized and named wiki links had the wrong linktext inserted into the :: wikilinks table > > 3. Are square brackets in page names allowed? Currently: no. And yes, any attempt to use "]" inside links has unpredicted consequences. > Well, can you give some reasons why it should be allowed? Me wonders too. You know, for my petproject "Sensei's Library" I have modified it the following way. Bracketlinks are possible, but they have a restricted regexp. Basically it boils down to that [some page] is equal to SomePage or [yet another page] == YetAnotherPage. I.e. it is only used for readability purposes. Well, ok I filter out some chars as well so that e.g. [Sensei's Library] == SenseisLibrary. The only thing you can do inside brackets that you can't replicate with BumpyText is single words like [Link]. > > solve this I would suggest that closing brackets should also be > > escaped, i.e., ']' should be written as ']]' if it is not meant as an > That's logically consistent... What do you think Arno? Logical, yes, but I still don't like it. I'm not too keen to include it, but of course I won't stay in the way of progress either ;) I assume that allowing those brackets causes more trouble for casual visitors seeing and trying to recreate links like "cool [awesome] page". A straight-forward failure to use "]" is easier to understand. And don't tell me it can be found in the manual somewhere. People don't read manuals. /Arno |