lib/auth.strategies/http/mac.js
function percentEscape(value) {

    // Percent-escape per specification

    var escapedString = '';

    for (var i = 0; i < value.length; i++) {

        var char = value.charCodeAt(i);

        if ((char >= 48 && char <= 57) ||       // 09
            (char >= 65 && char <= 90) ||       // AZ
            (char >= 97 && char <= 122) ||      // az
            char == 45 ||                       // -
            char == 95 ||                       // _
            char == 46 ||                       // .
            char == 126) {                      // ~

            escapedString += String.fromCharCode(char);
        }
        else {

            escapedString += '%' + char.toString(16).toUpperCase();
        }
    }

    return escapedString;
}
function percentEscape(value) {

    // Percent-escape per specification

    var escapedString = '';

    for (var i = 0; i < value.length; i++) {

        var char = value.charCodeAt(i);

        if ((char >= 48 && char <= 57) ||       // 09
            (char >= 65 && char <= 90) ||       // AZ
            (char >= 97 && char <= 122) ||      // az
            char == 45 ||                       // -
            char == 95 ||                       // _
            char == 46 ||                       // .
            char == 126) {                      // ~

            escapedString += String.fromCharCode(char);
        }
        else {

            escapedString += '%' + char.toString(16).toUpperCase();
        }
    }

    return escapedString;
}
function percentEscape ( value ) { // Percent-escape per specification var escapedString = '' ; for ( var i = 0 ; i < value . length ; i ++ ) { var char = value . charCodeAt ( i ) ; if ( ( char >= 48 && char <= 57 ) || // 09 ( char >= 65 && char <= 90 ) || // AZ ( char >= 97 && char <= 122 ) || // az char == 45 || // - char == 95 || // _ char == 46 || // . char == 126 ) { // ~ escapedString += String . fromCharCode ( char ) ; } else { escapedString += '%' + char . toString ( 16 ) . toUpperCase ( ) ; } } return escapedString ; }
Percent encode values per custom specification
Percent encode values per custom specification