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

Data URIs do not work on iOS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.1.0
    • cordova-ios
    • None

    Description

      The following code should create an iframe that says "asdf":

      var frame = document.createElement('iframe');
      frame.style.background = 'red';
      frame.src = 'data:text/html;charset=utf-8,%3C%21DOCTYPE%20HTML%3E%3Chtml%3E%3Cbody%3Easdf%3C%2Fbody%3E%3C%2Fhtml%3E'
      document.body.appendChild(frame);

      Instead, it gets blocked and a log message shows up:

      AppDelegate::shouldStartLoadWithRequest: Received Unhandled URL data:text/html;charset=utf-8,%3C%21DOCTYPE%20HTML%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3Easdf%3C%2Fbody%3E%3C%2Fhtml%3E

      Attachments

        Activity

          People

            agrieve Andrew Grieve
            agrieve Andrew Grieve
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: