* We need our custom method because encodeURIComponent is too aggressive and doesn't follow * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path * segments: * segment = *pchar * pchar = unreserved / pct-encoded / sub-delims / ":" / "
(val)
| 855 | * / "*" / "+" / "," / ";" / "=" |
| 856 | */ |
| 857 | function encodeUriSegment(val) { |
| 858 | return encodeUriQuery(val, true). |
| 859 | replace(/%26/gi, '&'). |
| 860 | replace(/%3D/gi, '='). |
| 861 | replace(/%2B/gi, '+'); |
| 862 | } |
| 863 | |
| 864 | |
| 865 | /** |
no test coverage detected