Displaying 5 results from an estimated 5 matches for "xml_entities".
2007 Oct 31
0
5 commits - libswfdec/swfdec_as_object.c libswfdec/swfdec_audio.c libswfdec/swfdec_sound.c libswfdec/swfdec_xml.c
...invalid UTF-8 on version 5
diff --git a/libswfdec/swfdec_xml.c b/libswfdec/swfdec_xml.c
index f447e46..37174bc 100644
--- a/libswfdec/swfdec_xml.c
+++ b/libswfdec/swfdec_xml.c
@@ -133,7 +133,7 @@ swfdec_xml_unescape_len (SwfdecAsContext *cx, const char *orginal,
if (!g_ascii_strncasecmp (p, xml_entities[i].escaped,
strlen (xml_entities[i].escaped))) {
// FIXME: Do this cleaner
- if (cx->version > 5 && xml_entities[i].character == '\xa0')
+ if (xml_entities[i].character == '\xa0')
string = g_string_append_c (string, '\xc2');
string = g_string_appe...
2007 Oct 14
0
5 commits - libswfdec/swfdec_html_parser.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml.h
...c_xml_unescape_len (const char *orginal, gssize length)
+swfdec_xml_unescape_len (SwfdecAsContext *cx, const char *orginal,
+ gssize length)
{
int i;
const char *p, *start;
@@ -132,7 +133,7 @@ swfdec_xml_unescape_len (const char *orginal, gssize length)
if (!g_ascii_strncasecmp (p, xml_entities[i].escaped,
strlen (xml_entities[i].escaped))) {
// FIXME: Do this cleaner
- if (xml_entities[i].character == '\xa0')
+ if (cx->version > 5 && xml_entities[i].character == '\xa0')
string = g_string_append_c (string, '\xc2');
string = g_string_appe...
2007 Oct 13
0
5 commits - libswfdec/swfdec_html_parser.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_xml.c test/trace
...ampila at iki.fi>
Date: Sat Oct 13 14:23:16 2007 +0300
Unescape in swfdec_xml_unescape
diff --git a/libswfdec/swfdec_xml.c b/libswfdec/swfdec_xml.c
index e932bf8..a710f15 100644
--- a/libswfdec/swfdec_xml.c
+++ b/libswfdec/swfdec_xml.c
@@ -74,6 +74,7 @@ static EntityConversion xml_entities[] =
{ '\'', "'" },
{ '<', "<" },
{ '>', ">" },
+ { '\xa0', " " },
{ '\0', NULL }
};
@@ -86,6 +87,7 @@ swfdec_xml_escape_len (const char *orgin
string = g_st...
2007 Dec 23
0
6 commits - libswfdec/Makefile.am libswfdec/swfdec_character.c libswfdec/swfdec_external_interface.c libswfdec/swfdec.h libswfdec/swfdec_movie_as_drawing.c libswfdec/swfdec_player.c libswfdec/swfdec_player.h libswfdec/swfdec_player_internal.h
...ar *
swfdec_xml_unescape_len (SwfdecAsContext *cx, const char *orginal,
- gssize length)
+ gssize length, gboolean unescape_nbsp)
{
int i;
const char *p, *start;
@@ -134,8 +134,12 @@ swfdec_xml_unescape_len (SwfdecAsContext *cx, const char *orginal,
if (!g_ascii_strncasecmp (p, xml_entities[i].escaped,
strlen (xml_entities[i].escaped))) {
// FIXME: Do this cleaner
- if (xml_entities[i].character == '\xa0')
- string = g_string_append_c (string, '\xc2');
+ if (xml_entities[i].character == '\xa0') {
+ if (unescape_nbsp)
+ string = g_string_append_c...
2008 Jan 07
0
3 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/swfdec_as_array.c libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_types.c libswfdec/swfdec_xml.c
...ot;");
p = start = orginal;
- while ((p = strchr (p, '&')) != NULL && p - orginal < length) {
+ end = orginal + length;
+ while ((p = memchr (p, '&', end - p)) != NULL) {
string = g_string_append_len (string, start, p - start);
for (i = 0; xml_entities[i].escaped != NULL; i++) {
commit 1b0c6573542709794c06462805825797d3d23888
Author: Benjamin Otte <otte at gnome.org>
Date: Fri Jan 4 19:18:04 2008 +0100
g_thread_init() is called by swfdec_init() already, no need to call it again
diff --git a/libswfdec-gtk/swfdec_gtk_loader.c b/libswf...