Mercurial > pidgin
diff libpurple/util.h @ 29359:05d727f76ca9
Combine the three purple_unescape_text()s into one.
purple_unescape_text is like purple_unescape_html, except better. I say
better, but really, what I should say is "libxml2 BLOWS", because of its
crazy way of leaving attributes "unescaped".
| author | Paul Aurich <paul@darkrain42.org> |
|---|---|
| date | Wed, 10 Feb 2010 04:05:50 +0000 |
| parents | 93afc09a5e18 |
| children | 0646207f360f |
line wrap: on
line diff
--- a/libpurple/util.h Wed Feb 10 04:01:16 2010 +0000 +++ b/libpurple/util.h Wed Feb 10 04:05:50 2010 +0000 @@ -516,18 +516,35 @@ char *purple_markup_linkify(const char *str); /** - * Unescapes HTML entities to their literal characters. Also translates - * "<br>" to "\n". - * For example "&" is replaced by '&' and so on. + * 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". + * + * @param text The string in which to unescape any HTML entities * - * The following named entities are supported (in addition to numerical - * entities): - * "&", "<", ">", "©", """, "®", "'" + * @return The text with HTML entities literalized. You must g_free + * this string when finished with it. + * + * @see purple_unescape_html() + * @since 2.7.0 + */ +char *purple_unescape_text(const char *text); + +/** + * Unescapes HTML entities to their literal characters and converts + * "<br>" to "\n". See purple_unescape_text() for more details. * * @param html The string in which to unescape any HTML entities * * @return The text with HTML entities literalized. You must g_free * this string when finished with it. + * + * @see purple_unescape_text() */ char *purple_unescape_html(const char *html);
