* 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 / "/" / "?" ) * pc
(val, pctEncodeSpaces)
| 1619 | * / "*" / "+" / "," / ";" / "=" |
| 1620 | */ |
| 1621 | function encodeUriQuery(val, pctEncodeSpaces) { |
| 1622 | return encodeURIComponent(val). |
| 1623 | replace(/%40/gi, '@'). |
| 1624 | replace(/%3A/gi, ':'). |
| 1625 | replace(/%24/g, '$'). |
| 1626 | replace(/%2C/gi, ','). |
| 1627 | replace(/%3B/gi, ';'). |
| 1628 | replace(/%20/g, (pctEncodeSpaces ? '%20' : '+')); |
| 1629 | } |
| 1630 | |
| 1631 | var ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-']; |
| 1632 |
no outgoing calls
no test coverage detected