class UrlStripHtmlSanitizer implements Sanitizer<String> {

    @Override
    public String execute(String content) {
        if (StringUtils.isBlank(content)) {
            return content;
        }

        URI uri;
        try {
            uri = new URI(content);
        } catch (URISyntaxException e) {
            throw new RuntimeException(e);
        }

        List<NameValuePair> cleanedPairs = parse(uri);

        String queryString = cleanedPairs.isEmpty() ? null : URLEncodedUtils.format(cleanedPairs, ENCODING);

        try {
            return URIUtils.createURI(uri.getScheme(), uri.getHost(), uri.getPort(), uri.getPath(), queryString, uri.getFragment()).toString();
        } catch (URISyntaxException e) {
            throw new RuntimeException(e);
        }
    }

}