This commit is contained in:
Shinsuke Sugaya 2017-09-21 06:44:40 +09:00
parent 8fdf3847d9
commit f46d7c386a
2 changed files with 8 additions and 6 deletions

View file

@ -204,12 +204,6 @@ public interface FessTransformer {
u = StringUtil.EMPTY;
}
}
try {
u = URLDecoder.decode(u, encoding);
} catch (final Exception e) {
// ignore
}
return u;
}

View file

@ -76,6 +76,14 @@ public class FessFileTransformerTest extends UnitFessTestCase {
url = "http://example.com/" + encodeUrl("#") + "/@@folder/test.txt";
exp = "test.txt";
assertEquals(exp, transformer.getFileName(url, Constants.UTF_8));
url = "http://example.com/test%20+%2B.txt";
exp = "test +.txt";
assertEquals(exp, transformer.getFileName(url, Constants.UTF_8));
url = "file://example.com/test%20+%2B.txt";
exp = "test ++.txt";
assertEquals(exp, transformer.getFileName(url, Constants.UTF_8));
}
public void test_decodeUrl_null() throws Exception {