QWebFrame::toHtml() is encoding <> automatically!



  • Below is a testing php script,

    @<?php
    echo $_GET['abc'], "<br/>";
    echo htmlentities($_GET['abc']);
    ?>@

    If I retrieve the contents of that page with chromium browser, showing the source code reveals contents like this:

    @<><br/>& lt;& gt;@ (Remove the "space")

    But with QWebFrame::toHtml(), all <> are encoded, and I got:

    @<html><head></head><body>& lt;& gt;<br>& lt;& gt; </body></html>@
    (Remove the space!)

    So clearly createMarkup encoded them, can I stop that behavior?


  • Moderators

    according to QWebFrame's implementation there is no way ... at least with the toHtml()-method.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.