* This method is intended for encoding *key* or *value* parts of query component. We need a custom * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be * encoded per http://tools.ietf.org/html/rfc3986: * query = *( pchar / "/" / "?" ) * pcha
(val, pctEncodeSpaces)
| 1221 | * / "*" / "+" / "," / ";" / "=" |
| 1222 | */ |
| 1223 | function encodeUriQuery(val, pctEncodeSpaces) { |
| 1224 | return encodeURIComponent(val). |
| 1225 | replace(/%40/gi, '@'). |
| 1226 | replace(/%3A/gi, ':'). |
| 1227 | replace(/%24/g, '$'). |
| 1228 | replace(/%2C/gi, ','). |
| 1229 | replace(/%3B/gi, ';'). |
| 1230 | replace(/%20/g, (pctEncodeSpaces ? '%20' : '+')); |
| 1231 | } |
| 1232 | |
| 1233 | var ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-']; |
| 1234 |
no outgoing calls
no test coverage detected