Function

Purplemarkup_unescape_entity

Declaration [src]

const char*
purple_markup_unescape_entity (
  const char* text,
  int* length
)

Description [src]

Returns a constant string of the character representation of the HTML entity pointed to by text. For example, purple_markup_unescape_entity(“&”) will return “&”. The text variable is expected to point to an ‘&’, the first character of the entity. If given an unrecognized entity, the function returns NULL.

Note that this function, unlike purple_unescape_html(), does not search the string for the entity, does not replace the entity, and does not return a newly allocated string.

Parameters

text const char*
 

A string containing an HTML entity.

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

If not NULL, the string length of the entity is stored in this location.

 The data is owned by the caller of the function.

Return value

Returns: const char*
 

A constant string containing the character representation of the given entity.

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