omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Webview load_html issue

    Pythonista
    2
    2
    1499
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DigiDan
      DigiDan last edited by

      When using ui.webview.load_html() to use an HTML string the subsequent web page loaded has problems loading any relative links. All of these links have the protocol applewebdata://. From my research it seems that the equivalent objective c uiwebview function takes an extra baseUrl parameter to allow it to handle these links correctly.
      Is there any chance to update ui.webview to take this extra parameter?

      1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by

        Since you have the string, just use replace all instances with http...
        Alternatively, implement a webview_should_start_load In your delegate that does this, though that will only work for clicked links

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Powered by NodeBB Forums | Contributors