diff --git a/ChangeLog b/ChangeLog index dd783ce88c..664e6c7beb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-09-23 Tim-Philipp Müller + + Patch by: Young-Ho Cha + + * gst/subparse/samiparse.c: (handle_start_font), + (fix_invalid_entities): + More case-insensitivity for certain tags; recognise entities with + decimal codes as special entities as well (#357330). + 2006-09-23 Tim-Philipp Müller * gst-libs/gst/Makefile.am: diff --git a/gst/subparse/samiparse.c b/gst/subparse/samiparse.c index fbe79b974f..39164f716e 100644 --- a/gst/subparse/samiparse.c +++ b/gst/subparse/samiparse.c @@ -177,12 +177,12 @@ handle_start_font (GstSamiContext * sctx, const xmlChar ** atts) } /* silver colour can be found in many sami files, but X RGB database * doesn't contain a colour by this name, so map explicitly */ - if (!xmlStrncmp ((const xmlChar *) "silver", value, 6)) { + if (!xmlStrncasecmp ((const xmlChar *) "silver", value, 6)) { value = (const xmlChar *) "#c0c0c0"; } g_string_append_printf (sctx->buf, " foreground=\"%s%s\"", sharp, value); - } else if (!xmlStrncmp ((const xmlChar *) "face", key, 4)) { + } else if (!xmlStrncasecmp ((const xmlChar *) "face", key, 4)) { g_string_append_printf (sctx->buf, " font_family=\"%s\"", value); } } @@ -376,7 +376,8 @@ fix_invalid_entities (const gchar * line) && g_ascii_strncasecmp (cp, "apos;", 5) && g_ascii_strncasecmp (cp, "lt;", 3) && g_ascii_strncasecmp (cp, "gt;", 3) - && g_ascii_strncasecmp (cp, "nbsp;", 5)) { + && g_ascii_strncasecmp (cp, "nbsp;", 5) + && cp[0] != '#') { /* translate "&" to "&" */ ret = g_string_append_len (ret, "&", 5); } else {