rehamaltamimi / gwtwiki

Automatically exported from code.google.com/p/gwtwiki
0 stars 0 forks source link

first letter of link was not encoded. #37

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. set up the WikiModel, passing in "/wikiDocument.do?title=${title}" as
the base link uri
2. pass in an internal link: [[Japanese title]] 
3. receive back the html: <a href="/wikiDocument.do?title=Japanese title
not encoded first letter">Japanese title</a>

What is the expected output? What do you see instead?
input: [[京都市]]
expected output: <a href="/wikiDocument.do?title=%E4%BA%AC%E9%83%BD%E5%B8%82">
instead output:  <a href="/wikiDocument.do?title=京%E9%83%BD%E5%B8%82">

What version of the product are you using? On what operating system?

product:bliki-core-3.0.13
on:Windows 7, Windows XP

Please provide any additional information below.

Encorder.encodeTitleToUrl/encodeTitleDotUrl.
In these functions, please encode first character too.

thanks.

Original issue reported on code.google.com by masaya...@gmail.com on 27 Apr 2010 at 2:48

GoogleCodeExporter commented 8 years ago

Original comment by axelclk@gmail.com on 28 Apr 2010 at 7:06

GoogleCodeExporter commented 8 years ago
Try these changes in the info.bliki.wiki.filter.Encoder
http://code.google.com/p/gwtwiki/source/detail?r=1108

or override the encodeTitleToUrl() and encodeTitleDotUrl() methods in your 
IWikiModel
implementtion like this, if you don't need the conversion to uppercase 
character for
the first character of the title:

{{{
    public String encodeTitleToUrl(String wikiTitle, boolean firstCharacterAsUpperCase) {
        return Encoder.encodeTitleToUrl(wikiTitle, false);
    }

    public String encodeTitleDotUrl(String wikiTitle, boolean firstCharacterAsUpperCase) {
        return Encoder.encodeTitleDotUrl(wikiTitle, false);
    }
}}}

Original comment by axelclk@gmail.com on 28 Apr 2010 at 7:18

GoogleCodeExporter commented 8 years ago
Thanks so match!

Original comment by masaya...@gmail.com on 30 Apr 2010 at 5:44

GoogleCodeExporter commented 8 years ago

Original comment by axelclk@gmail.com on 13 May 2010 at 3:29