Commit 4bf10589 authored by Marco Descher's avatar Marco Descher
Browse files

[23069] SmbURLStreamHandlerService use URLDecoder

parent 1a39673a
Pipeline #22215 passed with stages
in 4 minutes and 30 seconds
package ch.elexis.core.jcifs;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLDecoder;
import java.util.Properties;
import org.osgi.service.component.annotations.Component;
......@@ -53,9 +55,8 @@ public class SmbURLStreamHandlerService extends AbstractURLStreamHandlerService
}
private String replaceEach(String externalForm){
return externalForm.replaceAll("%25", "%").replaceAll("%20", " ").replaceAll("%23", "#").replaceAll("%5B", "[")
.replaceAll("%5D", "]");
private String replaceEach(String externalForm) throws UnsupportedEncodingException{
return URLDecoder.decode(externalForm, "UTF-8");
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment