dependency-check-core/src/main/java/org/owasp/dependencycheck/dependency/VulnerableSoftware.java
/**
     * Replaces '+' with '%2B' and then URL Decodes the string attempting first UTF-8, then ASCII, then default.
     *
     * @param string the string to URL Decode
     * @return the URL Decoded string
     */
Replaces '+' with '%2B' and then URL Decodes the string attempting first UTF-8, then ASCII, then default.
@param string the string to URL Decode
@return the URL Decoded string
Replaces ' + ' with ' %2B ' and then URL Decodes the string attempting first UTF - 8 then ASCII then default . @param string the string to URL Decode @return the URL Decoded string
private String urlDecode(String string) {
        final String text = string.replace("+", "%2B");
        String result;
        try {
            result = URLDecoder.decode(text, "UTF-8");
        } catch (UnsupportedEncodingException ex) {
            try {
                result = URLDecoder.decode(text, "ASCII");
            } catch (UnsupportedEncodingException ex1) {
                result = defaultUrlDecode(text);
            }
        }
        return result;
    }
private String urlDecode ( String string ) { final String text = string . replace ( "+" , "%2B" ) ; String result ; try { result = URLDecoder . decode ( text , "UTF-8" ) ; } catch ( UnsupportedEncodingException ex ) { try { result = URLDecoder . decode ( text , "ASCII" ) ; } catch ( UnsupportedEncodingException ex1 ) { result = defaultUrlDecode ( text ) ; } } return result ; }
Replaces '+' with '%2B' and then URL Decodes the string attempting first UTF-8, then ASCII, then default.
Replaces ' + ' with ' %2B ' and then URL Decodes the string attempting first UTF - 8 then ASCII then default .