claws-mail/src/entity.h
Ricardo Mones d61f4bdfcb Implement HTML entity decoding in one function
Content of symbols table remixed from existing html.c and
rssyl/strutils.c tables.
2017-11-15 20:35:48 +01:00

33 lines
1.2 KiB
C

/*
* Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 2017 Ricardo Mones and the Claws Mail team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ENTITY_H__
#define __ENTITY_H__
#include <glib.h>
/*
* Try to decode the HTML entity pointed by str, whose first element
* must be the '&' character.
*
* Returns a newly-allocated string with the decoded entity or NULL
* on failure to decode (like an unknown or invalid entity).
* Returned strings must be freed with g_free().
*/
gchar *entity_decode(gchar *str);
#endif /* __ENTITY_H__ */