Results 1 to 5 of 5

Thread: Encode html special characters

  1. #1
    Join Date
    Aug 2008
    Posts
    70
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Encode html special characters

    Hello,

    I am looking a way to encode a string in html.

    Do you know how to do that in QT ?

  2. #2
    Join Date
    Aug 2008
    Posts
    70
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Encode html special characters

    Nobody knows ! It seems simple !

  3. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Encode html special characters

    I don't know such a function, but you can do 5 simple string replacements your own...

  4. #4
    Join Date
    Aug 2008
    Posts
    70
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Encode html special characters

    Which ones ?

  5. #5
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Encode html special characters

    Quote Originally Posted by miraks View Post
    Which ones ?
    use google, but you can start with "<" and ">"...

    EDIT: Because I'm nice:
    * '&' (ampersand) becomes '&amp;'
    * '"' (double quote) becomes '&quot;'
    * ''' (single quote) becomes '&#039;''
    * '<' (less than) becomes '&lt;'
    * '>' (greater than) becomes '&gt;'

Similar Threads

  1. QTableView + sorting + numbers & special characters
    By foggy-mind in forum Qt Programming
    Replies: 5
    Last Post: 4th June 2009, 11:11
  2. Special character's HTML entity to string
    By Hiba in forum Qt Programming
    Replies: 4
    Last Post: 3rd March 2009, 14:05
  3. special characters in xml
    By khcbabu in forum Qt Programming
    Replies: 3
    Last Post: 6th November 2008, 22:10
  4. Special characters in Html blocks
    By giusepped in forum Qt Programming
    Replies: 4
    Last Post: 27th October 2008, 08:13
  5. Problem at time compilation in traslation of language
    By thomasjoy in forum Qt Programming
    Replies: 3
    Last Post: 22nd May 2007, 14:18

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.