You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jspwiki.apache.org by Andrew Morgenegg <an...@utah.edu> on 2011/12/22 22:44:34 UTC

Question about percent signs in jspwiki links

I have a question about jspwiki.  I am running v2.8.4.  I set jspwiki.properties with

jspwiki.percentsign = {{{

I restarted my tomcat server and then tried to use {{{ to get a percent sign in a link in the wiki, but it does not work.  The wiki replaces the {{{ with %7B%7B%7B.

>From what I understand from the jspwiki faqs jspwiki.percentsign was added to jspwiki in a previous release.  Was it removed in the release I am running?

Is there another way to put a percent sign in a link path?

I appreciate your help.

Thank you,

Andrew Morgenegg
andrew.morgenegg@utah.edu
(801) 581-6587
Webmaster
Institute for Clean and Secure Energy
University of Utah

Re: Question about percent signs in jspwiki links

Posted by Andrew Morgenegg <an...@utah.edu>.
I found that it was escaping the space properly, but the image was so large
that you couldn't see it without scrolling so it looked blank.  By using the
image link plug-in instead I was able to make this work.

Thank you,
Andrew

> From: Administrator <an...@utah.edu>
> Reply-To: "jspwiki-user@incubator.apache.org"
> <js...@incubator.apache.org>
> Date: Tue, 27 Dec 2011 09:05:00 -0700
> To: "jspwiki-user@incubator.apache.org" <js...@incubator.apache.org>
> Subject: Re: Question about percent signs in jspwiki links
> 
>> Hi Andrew,
>> 
>>> From what I understand from the jspwiki faqs jspwiki.percentsign was added
>>> to
>>> jspwiki in a previous release.  Was it removed in the release I am running?
>> 
>> I couldn't find that property in the current 2.8 branch, so I guess this is
>> outdated information. Where exactly did you find this hint?
> 
> I found this in a few places.  One being
> 
> http://www.jspwiki.org/wiki/FAQFormatting
> 
> I guess it was something that was removed.
> 
>> 
>>> Is there another way to put a percent sign in a link path?
> 
> What I have is attached files from users that have a space in the link.
> When it is linking to a non image file it correctly encodes the space and
> the link works.  When it is linking to an image the space is not encoded
> properly so the image link does not work.  When I try to manually encode the
> space with a %20 it encodes the % to %25 so I end up with %2520 which does
> not work either.  I need a way to either keep the space or have jspwiki
> encode it properly to %20 on image links like it does to links to other
> attachments.
> 
> Thank you,
> Andrew
> 
>> 
>> I'm not aware of any, but maybe others, who know the code better, do.
>> 
>> However, I don't think it is a good idea to put percent signs in a link path.
>> The reason is percent encoding of URIs (see RFC 3986 [1]), which uses the
>> percent sign as a special character. The percent sign itself has to be
>> encoded
>> as %25.
>> 
>> Regards
>>  Florian
>> 
>> [1] http://tools.ietf.org/html/rfc3986
> 


Re: Question about percent signs in jspwiki links

Posted by Andrew Morgenegg <an...@utah.edu>.
> Hi Andrew,
> 
>> From what I understand from the jspwiki faqs jspwiki.percentsign was added to
>> jspwiki in a previous release.  Was it removed in the release I am running?
> 
> I couldn't find that property in the current 2.8 branch, so I guess this is
> outdated information. Where exactly did you find this hint?

I found this in a few places.  One being

http://www.jspwiki.org/wiki/FAQFormatting

I guess it was something that was removed.

> 
>> Is there another way to put a percent sign in a link path?

What I have is attached files from users that have a space in the link.
When it is linking to a non image file it correctly encodes the space and
the link works.  When it is linking to an image the space is not encoded
properly so the image link does not work.  When I try to manually encode the
space with a %20 it encodes the % to %25 so I end up with %2520 which does
not work either.  I need a way to either keep the space or have jspwiki
encode it properly to %20 on image links like it does to links to other
attachments.

Thank you,
Andrew

> 
> I'm not aware of any, but maybe others, who know the code better, do.
> 
> However, I don't think it is a good idea to put percent signs in a link path.
> The reason is percent encoding of URIs (see RFC 3986 [1]), which uses the
> percent sign as a special character. The percent sign itself has to be encoded
> as %25.
> 
> Regards
>  Florian
> 
> [1] http://tools.ietf.org/html/rfc3986


Re: Question about percent signs in jspwiki links

Posted by Florian Holeczek <fl...@holeczek.de>.
Hi Andrew,

> From what I understand from the jspwiki faqs jspwiki.percentsign was added to jspwiki in a previous release.  Was it removed in the release I am running?

I couldn't find that property in the current 2.8 branch, so I guess this is outdated information. Where exactly did you find this hint?

> Is there another way to put a percent sign in a link path?

I'm not aware of any, but maybe others, who know the code better, do.

However, I don't think it is a good idea to put percent signs in a link path. The reason is percent encoding of URIs (see RFC 3986 [1]), which uses the percent sign as a special character. The percent sign itself has to be encoded as %25.

Regards
 Florian

[1] http://tools.ietf.org/html/rfc3986