MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / encodeUriQuery

Function encodeUriQuery

lib/test/angular/1.5.0/angular.js:1431–1439  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

1429 * / "*" / "+" / "," / ";" / "="
1430 */
1431function encodeUriQuery(val, pctEncodeSpaces) {
1432 return encodeURIComponent(val).
1433 replace(/%40/gi, '@').
1434 replace(/%3A/gi, ':').
1435 replace(/%24/g, '$').
1436 replace(/%2C/gi, ',').
1437 replace(/%3B/gi, ';').
1438 replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));
1439}
1440
1441var ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-'];
1442

Callers 4

toKeyValueFunction · 0.70
encodeUriSegmentFunction · 0.70
serializeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected