B2G/gecko/dom/apps/src/Webapps.jsm
// Ensure that the .to property in redirects is a relative URL.
Ensure that the .to property in redirects is a relative URL.
Ensure that the . to property in redirects is a relative URL .
function sanitizeRedirects(aSource) {
    if (!aSource) {
      return null;
    }
    let res = [];
    for (let i = 0; i < aSource.length; i++) {
      let redirect = aSource[i];
      if (redirect.from && redirect.to &&
          isAbsoluteURI(redirect.from) &&
          !isAbsoluteURI(redirect.to)) {
        res.push(redirect);
      }
    }
    return res.length > 0 ? res : null;
  }
function sanitizeRedirects ( aSource ) { if ( ! aSource ) { return null ; } let res = [ ] ; for ( let i = 0 ; i < aSource . length ; i ++ ) { let redirect = aSource [ i ] ; if ( redirect . from && redirect . to && isAbsoluteURI ( redirect . from ) && ! isAbsoluteURI ( redirect . to ) ) { res . push ( redirect ) ; } } return res . length > 0 ? res : null ; }
Ensure that the .to property in redirects is a relative URL.
Ensure that the . to property in redirects is a relative URL .