mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
gst/subparse/samiparse.c: More case-insensitivity for certain tags; recognise entities with decimal codes as special ...
Original commit message from CVS: Patch by: Young-Ho Cha <ganadist at chollian dot net> * 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).
This commit is contained in:
parent
77c1be94ad
commit
0c4b5067f6
2 changed files with 13 additions and 3 deletions
|
@ -1,3 +1,12 @@
|
|||
2006-09-23 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
Patch by: Young-Ho Cha <ganadist at chollian dot net>
|
||||
|
||||
* 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 <tim at centricular dot net>
|
||||
|
||||
* gst-libs/gst/Makefile.am:
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue