Mercurial > audlegacy-plugins
changeset 1514:a8430f6ea7a2
reverted a local change on xspf that wasn't supposed to be committed
author | Giacomo Lozito <james@develia.org> |
---|---|
date | Thu, 23 Aug 2007 00:02:43 +0200 |
parents | a3e002f56bd6 |
children | fc1b025e6900 |
files | src/xspf/xspf.c |
diffstat | 1 files changed, 2 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xspf/xspf.c Thu Aug 23 00:00:49 2007 +0200 +++ b/src/xspf/xspf.c Thu Aug 23 00:02:43 2007 +0200 @@ -331,34 +331,6 @@ xmlFreeDoc(doc); } -#define DEBUG_NOCTRL_VALIDATOR 1 - -static gboolean validate_no_cntrl(const gchar *str) -{ - /* str must have been validated! */ - const gchar *p = str; - glong len = g_utf8_strlen(str, -1), i = 0; -#ifdef DEBUG_NOCTRL_VALIDATOR - g_print("xspf -> NOCTRL VALIDATING '%s', length %li ... ",str,len); -#endif - for ( i = 0 ; i < len - 1 ; i++ ) - { - p = g_utf8_next_char(p); - gunichar uc = g_utf8_get_char(p); - if ( g_unichar_iscntrl(uc) ) - { -#ifdef DEBUG_NOCTRL_VALIDATOR - g_print("NOCTRL VALIDATE FAIL!\n"); -#endif - return FALSE; - } - } -#ifdef DEBUG_NOCTRL_VALIDATOR - g_print("VALIDATE OK!\n"); -#endif - return TRUE; -} - static void playlist_save_xspf(const gchar *filename, gint pos) { xmlDocPtr doc; @@ -520,7 +492,7 @@ const gchar *scratch; if((scratch = tuple_get_string(entry->tuple, "title")) != NULL && - g_utf8_validate(scratch, -1, NULL) && validate_no_cntrl(scratch)) { + g_utf8_validate(scratch, -1, NULL)) { tmp = xmlNewNode(NULL, (xmlChar *)"title"); xmlAddChild(tmp, xmlNewText((xmlChar *) scratch)); xmlAddChild(track, tmp); @@ -627,7 +599,7 @@ } /* tuple */ else { - if(entry->title != NULL && g_utf8_validate(entry->title, -1, NULL) && validate_no_cntrl(entry->title)) { + if(entry->title != NULL && g_utf8_validate(entry->title, -1, NULL)) { tmp = xmlNewNode(NULL, (xmlChar *)"title"); xmlAddChild(tmp, xmlNewText((xmlChar *)entry->title)); xmlAddChild(track, tmp);