Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-11270

[QUESTION] Is whitelist intent filter working as intended?

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • cordova-ios
    • None

    Description

      In 3.8.0, given an intent directive like

      <allow-intent href="tel:*" />
      

      , interacting with any of the following elements would result in tel: requests that would all be allowed:

      <a id="tel-button" href="tel:777777777">do tel with a.href</a>
      
      <a id="tel-a-onclick" onclick="document.location.href='tel:777777777';">do tel with a.onclick</a>
      
      <button id="tel-button" onclick="document.location.href='tel:777777777';">do tel with button.onclick</button>
      

      However, in 4.1.1, only the first interaction will be allowed.
      This is because intent directives are only applied to the UIWebViewNavigationTypeLinkClicked navigationType (the navigationType for the second and third examples is UIWebViewNavigationTypeOther).

      Is this working as intended?

      It seems that either the whitelist intent filter in 4+ is not working as intended or, if working as intended, the documentation should be improved to spell out this case.

      Attachments

        Issue Links

          Activity

            People

              shazron Shazron Abdullah
              tony-- Tony Homer
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: