Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. String received with Html characters
Forum Updated to NodeBB v4.3 + New Features

String received with Html characters

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 988 Views
  • 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.
  • R Offline
    R Offline
    rest
    wrote on last edited by
    #1

    i have a qstring that is a name that contains html characters for apostrophe , someone knows how i can convert it?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rest
      wrote on last edited by
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • R Offline
        R Offline
        rest
        wrote on last edited by VRonin
        #3

        ' is the character

        JonBJ 1 Reply Last reply
        0
        • R rest

          ' is the character

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #4

          @rest
          Some suggestions are at https://stackoverflow.com/questions/39328588/qt-translate-escape-sequence
          The accepted solution uses QTextDocumentFragment::fromHtml(b).toPlainText();

          Or, if you know what input HTML entities you expect, you could just do it with a regular expression.

          1 Reply Last reply
          1

          • Login

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