The same patch addresses both / and & in RemoteWikiLinks and URLs?, so I've factored these questions out from ZwikiProblems. Full credit to GeoffGardiner for the original proposition.
--GTK

a ZwikiModification


Would like RemoteWikiLinks to be extended to allow the construction FrikiServlet:images/image1.gif. The / seems to prevent the second part of the URL from being fully recognized.

Ok - an answer is to replace this line in ZWikiPage.py:

interwikilink = r'!?((?P<local>%s):(?P<remote>[\w]+))' % (wikilink)
First define
validURIchars = r'[A-Za-z0-9/:@_%~#=\.\-\?]' 
You can use these in one of the earlier definitions, too. Then
interwikilink = r'!?((?P<local>%s):(?P<remote>%s+))' % (wikilink, validURIchars)
--GeoffGardiner

Slightly more forgiving:
validURIchars = r'[A-Za-z0-9\/\:\@\_\%\~\#\=\.\-\?]'
--GTK


July 11, 2000: Zwiki doesn't like my interwiki links on UseModWiki. From a few tests it looks like it doesn't like the URL ending with ? or = characters. --CliffordAdams.

*NOTE: You can use my validURIchars patch to fix this
--GeoffGardiner*

I'm more concerned about whether this wiki will fix the problem, since I don't run a Zwiki. (I prefer Perl.) --CliffordAdams, Winner (most powerful) of the Third Obfuscated Perl contest (but not for his wiki code ;-)


Stops recognizing a URL at an ampersand, which causes problems whenever you want to use a URL which is a dynamic request. This is true both when you just let the URL hang out on its own, or when you try and make it into an implicit HREF.

Fix, based on code by GeoffGardiner:

validURIchars = r'[A-Za-z0-9\/\:\@\_\%\~\#\=\.\-\?\&]'
interwikilink = r'!?((?P<local>%s):(?P<remote>%s+))' % (wikilink, validURIchars)

Oh, hang on, we've said that already above. :)
--GTK


2000/08/26 - If you cut and paste the above code before this date, it didn't work due to <local> and <remote> were converted into html and hidden from view. Should work fine now. :)
interwikilink = r'!?((?P<local>%s):(?P<remote>%s+))' % (wikilink,validURIchars)

*Oh, well spotted! --GTK*


This fix seems to misinterpret a comma in a URL (as in http://www.wirednews.com/news/culture/0,1284,38595,00.html ) as the end of the URL. I tried the following without success (backslash comma added).

validURIchars=r'[A-Za-z0-9\/\:\@\_\%\~\#\=\.\-\,\?\&]'

Any suggestions?
Actually, I just noticed that it doesn't fix the problem with & either. --ira


just (re)discovered this page :) Thanks for these investigations, as far as I know all of the above are fixed as of 0.7.0 --SM