code: function encodeSpecialChars(str, specialCharsReg) {
          // encodeURI( ) is intended to encode complete URIs,
          // the following ASCII punctuation characters,
          // which have special meaning in URIs, are not escaped either:
          // ; / ? : @ & = + $ , #
          return encodeURI(str).replace(specialCharsReg, function (m) {
              return '%' + padding2(m.charCodeAt(0).toString(16));
          });
      }
docs: www.ta#bao.com // => www.ta.com/#bao.com www.ta%23bao.com Percent-Encoding