fix #1284 keep +
This commit is contained in:
parent
8fdf3847d9
commit
f46d7c386a
2 changed files with 8 additions and 6 deletions
|
@ -204,12 +204,6 @@ public interface FessTransformer {
|
|||
u = StringUtil.EMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
u = URLDecoder.decode(u, encoding);
|
||||
} catch (final Exception e) {
|
||||
// ignore
|
||||
}
|
||||
return u;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue