Logo Search packages:      
Sourcecode: kmess version File versions  Download package

QString & KMessShared::htmlUnescape ( QString &  string  )  [static]

Converts a string with escaped entities to one with HTML

Only the main HTML control characters are unescaped; the string is reverted back to its original state. Neither KDE nor Qt have HTML to text decoding methods. Annoying.

Parameters:
string The string to modify
Returns:
A reference to the modified string

Definition at line 356 of file kmessshared.cpp.

Referenced by htmlUnescape(), AddEmoticonDialog::preSelect(), and HttpSoapConnection::textNodeDecode().

{
  string.replace( """, "\"" )
        .replace( "'", "'"  )
        .replace( ">",  ">"  )
        .replace( "&lt;",  "<"  )
        .replace( "&#59;", "&amp;#59;"  )
        .replace( "&amp;", "&"  )
        .replace( "&#59;", ";"  );

  return string;
}


Generated by  Doxygen 1.6.0   Back to index