Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. return [emailprotected] when get content from a website
Forum Updated to NodeBB v4.3 + New Features

return [emailprotected] when get content from a website

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 300 Views 1 Watching
  • 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.
  • C Offline
    C Offline
    cuongkjm
    wrote on last edited by
    #1

    I am using QNetworkAccessManager to get content from a website via an url.
    My code is something like this:

    QNetworkRequest get_request(url);
    QNetworkReply* reply = nam->get(get_request);
    connect(reply, SIGNAL(finished()), this, SLOT(handle_get_reply()), Qt::QueuedConnection);
    

    and i get website content in handle_get_reply function, like this:

    std::string content = reply->readAll().toStdString();
    

    Everything seems to be ok. But there is one problem. If website contents contains some text like 12100F@5Ghz, my content string will be like this:

    <span class="__cf_email__" data-cfemail="48797a7978780e087d0f2032">[email&#160;protected]</span>
    

    when i access website url via web browsers. The content is showing normally.

    How can i fix this problem?

    1 Reply Last reply
    0
    • Paul ColbyP Offline
      Paul ColbyP Offline
      Paul Colby
      wrote on last edited by
      #2

      Hi @cuongkjm, have a read of this Stack Overflow question/answer:

      • I've seen this email protection on a website and would like to know how they have achieved this

      Cheers.

      1 Reply Last reply
      1
      • C Offline
        C Offline
        cuongkjm
        wrote on last edited by
        #3

        Thank you very much for your support. Your answer lead me to this answer: https://stackoverflow.com/a/58809612/8299222
        And it solves my problem.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved