Function

Purpleunescape_text

since: 2.7

Declaration [src]

char*
purple_unescape_text (
  const char* text
)

Description [src]

Unescapes HTML entities to their literal characters in the text. For example “&” is replaced by ‘&’ and so on. Also converts numerical entities (e.g. “&” is also ‘&’).

This function currently supports the following named entities: “&”, “<”, “>”, “©”, “"”, “®”, “'”

purple_unescape_html() is similar, but also converts “<br>” into “\n”.

See purple_unescape_html()

Available since: 2.7

Parameters

text

Type: const char*

The string in which to unescape any HTML entities.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.

Return value

Type: char*

The text with HTML entities literalized. You must g_free this string when finished with it.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.