Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-136082

Android Webview fails to load all html string because it is percent-encoded

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 6.9.0
    • WebView
    • None
    • Qt 6.9.0 Android arm64
    • Android
    • Android

    Description

      This example fails to load on android

      WebView {
          Component.onCompleted: loadHtml("<html><body>Hello</body></html>", "https://example.com") 
      } 

       and displays the following percent encoded string of the same html 

      "%3Chtml%3E%0A%3Cbody%3E%0AHello%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E"

       

      While digging into this, I found, that the html content is QUrl::toPercentEncoding(html) encoded and all the html tags are stripped away.

      The offending commit is https://github.com/qt/qtwebview/commit/9feccda3138fe0d6c88bf8ba99eb4b57965e95a6

      Why someone wrote this line and pushed it to production is beyond my comprehension.

      As of now Android WebView in 6.9.0 is useless for loading simple html content.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-136082
          # Subject Branch Project Status CR V

          Activity

            People

              michal Michal Klocek
              elendilm Muhammed Muneer
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change