[Vim-l] Template:Help - Simple fixes

John Beckett johnb.beckett at gmail.com
Tue Jun 26 04:57:49 UTC 2007


hermitte at free.fr <hermitte at free.fr> wrote:
>> Change "tag={{{1}}}" so parameter 1 is urlencoded.
>
> I had to remove {{urlencode:xxx}}. It does fix anything. On
> the contrary, it worsens the situation: single quotes are
> encoded while they must not.

You're saying that urlencode cannot be used at the moment.
I think that's because the CGI script does not use urldecode.
Once the script is fixed, I believe there will be no problem
with urlencode on the wiki.

Do you have any info to the contrary?

>> You can test this at
>>  http://vim.wikia.com/wiki/User_talk:JohnBeckett
>>  which includes "Experiment with Template:Help :help word".
>
> OK. That's extremelly odd. Again I have no problem,

Please try this: Go to my User_talk page, as above.
Click the link ':help word'.
I expect that will open
http://vimdoc.sourceforge.net/htmldoc/motion.html

and you will be positioned at the start of the page
(not at the #word anchor).

What happens when you try the above?

I have tried this on a couple of browsers in Windows and Linux.

> I've just done a test with IE (v7) and observed the same
> problem you do.

If your Firefox does not have this problem, it must be doing
some clever speculation. The problem is that when you go to
"xxx.sf.net#word", your browser sends "xxx.sf.net" (no #word) to
the web server. The browser intends to go to the anchor "#word"
when it gets the page back.

However what it gets back is a redirect to "xxx.sourceforge.net"
(with no #word). That causes the three browsers I've tried to
forget about the #word anchor.

All this will be fixed when Template:Help and the CGI script use
"sourceforge" instead of "sf".

>> Currently, Template:Help fails for tags like "<tab>" (because
>> of the angle brackets). I think that would work if
>> urlencoding were performed.
>
> Nope, it doesn't. I've already tried that.

I meant, it would work AFTER the CGI script is also fixed.
We would also need Template:Help to show the plain text
(original) tag, and only use the urlencode in the link.

I'll make a new message with a new scheme I've been chewing over
(a variation on what we're discussing here).

John


More information about the Vim-l mailing list