--- a/ChangeLog.API Tue Sep 20 22:43:37 2022 -0500
+++ b/ChangeLog.API Wed Sep 21 03:21:41 2022 -0500
@@ -473,6 +473,8 @@
purple_ipv6_address_is_valid. Use g_hostname_is_ip_address()
or #GInetAddress instead.
* purple_markup_extract_info_field
+ * purple_markup_get_css_property * PurpleMimeDocument, PurpleMimePart,
purple_mime_document_new, purple_mime_document_free,
purple_mime_document_parse, purple_mime_document_parsen,
--- a/libpurple/purplemarkup.c Tue Sep 20 22:43:37 2022 -0500
+++ b/libpurple/purplemarkup.c Wed Sep 21 03:21:41 2022 -0500
@@ -154,100 +154,6 @@
-purple_markup_get_css_property(const gchar *style,
- const gchar *css_str = style;
- const gchar *css_value_start;
- const gchar *css_value_end;
- g_return_val_if_fail(opt != NULL, NULL);
- /* find the CSS property */
- /* skip whitespace characters */
- while (*css_str && g_ascii_isspace(*css_str))
- if (!g_ascii_isalpha(*css_str))
- if (g_ascii_strncasecmp(css_str, opt, strlen(opt)))
- /* go to next css property positioned after the next ';' */
- while (*css_str && *css_str != '"' && *css_str != ';')
- /* find the CSS value position in the string */
- css_str += strlen(opt);
- while (*css_str && g_ascii_isspace(*css_str))
- while (*css_str && g_ascii_isspace(*css_str))
- if (*css_str == '\0' || *css_str == '"' || *css_str == ';')
- /* mark the CSS value */
- css_value_start = css_str;
- while (*css_str && *css_str != '"' && *css_str != ';')
- css_value_end = css_str - 1;
- /* Removes trailing whitespace */
- while (css_value_end > css_value_start && g_ascii_isspace(*css_value_end))
- tmp = g_strndup(css_value_start, css_value_end - css_value_start + 1);
- ret = purple_unescape_html(tmp);
-gboolean purple_markup_is_rtl(const char *html)
- const gchar *start, *end;
- if (purple_markup_find_tag("span", html, &start, &end, &attributes))
- /* tmp is a member of attributes and is free with g_datalist_clear call */
- const char *tmp = g_datalist_get_data(&attributes, "dir");
- if (tmp && !g_ascii_strcasecmp(tmp, "RTL"))
- tmp = g_datalist_get_data(&attributes, "style");
- char *tmp2 = purple_markup_get_css_property(tmp, "direction");
- if (tmp2 && !g_ascii_strcasecmp(tmp2, "RTL"))
- g_datalist_clear(&attributes);
purple_markup_find_tag(const char *needle, const char *haystack,
const char **start, const char **end, GData **attributes)
--- a/libpurple/purplemarkup.h Tue Sep 20 22:43:37 2022 -0500
+++ b/libpurple/purplemarkup.h Wed Sep 21 03:21:41 2022 -0500
@@ -191,35 +191,6 @@
const char * purple_markup_unescape_entity(const char *text, int *length);
- * purple_markup_get_css_property:
- * @style: A string containing the inline CSS text.
- * @opt: The requested CSS property.
- * Returns a newly allocated string containing the value of the CSS property specified
- * in opt. The @style argument is expected to point to a HTML inline CSS.
- * The function will seek for the CSS property and return its value.
- * For example, purple_markup_get_css_property("direction:rtl;color:#dc4d1b;",
- * "color") would return "#dc4d1b".
- * On error or if the requested property was not found, the function returns
- * Returns: The value of the requested CSS property.
-char * purple_markup_get_css_property(const gchar *style, const gchar *opt);
- * purple_markup_is_rtl:
- * @html: The HTML text.
- * Check if the given HTML contains RTL text.
- * Returns: TRUE if the text contains RTL text, FALSE otherwise.
-gboolean purple_markup_is_rtl(const char *html);
#endif /* PURPLE_MARKUP_H */