mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-23 22:16:16 +01:00
Don't treat whitespace as control chars.
2008-01-29 Alexander Larsson <alexl@redhat.com> * gcontenttype.c (looks_like_text): Don't treat whitespace as control chars. svn path=/trunk/; revision=6414
This commit is contained in:
parent
1fcaf2fe8d
commit
1efe9d9cd1
@ -1,3 +1,8 @@
|
||||
2008-01-29 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* gcontenttype.c (looks_like_text):
|
||||
Don't treat whitespace as control chars.
|
||||
|
||||
2008-01-29 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* gdesktopappinfo.c:
|
||||
|
@ -671,9 +671,14 @@ static gboolean
|
||||
looks_like_text (const guchar *data, gsize data_size)
|
||||
{
|
||||
gsize i;
|
||||
char c;
|
||||
|
||||
for (i = 0; i < data_size; i++)
|
||||
{
|
||||
if g_ascii_iscntrl (data[i])
|
||||
c = data[i];
|
||||
|
||||
if (g_ascii_iscntrl (c) &&
|
||||
!g_ascii_isspace (c))
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user