# HG changeset patch # User Luke Schierer # Date 1077744418 0 # Node ID 0d1e5870d328f25d605e142240960e815e541523 # Parent 85dbaac926a7d9c7e21869e4117b2a32e91b59af [gaim-migrate @ 9058] you can now use :/ as a smiley safely thanks to Nathan Owens. committer: Tailor Script diff -r 85dbaac926a7 -r 0d1e5870d328 COPYRIGHT --- a/COPYRIGHT Wed Feb 25 20:04:36 2004 +0000 +++ b/COPYRIGHT Wed Feb 25 21:26:58 2004 +0000 @@ -82,6 +82,7 @@ Arkadiusz Miskiewicz Andrew Molloy Padraig O'Briain +Nathan (pianocomp81) Owens Matt Pandina Ricardo Fernandez Pascual Havoc Pennington diff -r 85dbaac926a7 -r 0d1e5870d328 ChangeLog --- a/ChangeLog Wed Feb 25 20:04:36 2004 +0000 +++ b/ChangeLog Wed Feb 25 21:26:58 2004 +0000 @@ -26,6 +26,7 @@ (Send Message, Get User Info, and Insert Link dialogs) Bug Fixes: + * You can now use :/ as a smiley safely (Nathan Owens) * Various buffer overflow fixes (Stefan Esser) * Tabs now stay green when they are supposed to (Etan Reisner) * Fixed a bug where only the first user in a chat room list was removed diff -r 85dbaac926a7 -r 0d1e5870d328 src/gtkimhtml.c --- a/src/gtkimhtml.c Wed Feb 25 20:04:36 2004 +0000 +++ b/src/gtkimhtml.c Wed Feb 25 21:26:58 2004 +0000 @@ -1315,6 +1315,28 @@ return val; } +static const char *accepted_protocols[] = { + "http://", + "https://", + "ftp://" +}; + +static const int accepted_protocols_size = 3; + +/* returns if the beginning of the text is a protocol. If it is the protocol, returns the length so + the caller knows how long the protocol string is. */ +int gtk_imhtml_is_protocol(const char *text) +{ + gint i; + + for(i=0; i 0){ + while(len_protocol--){ + /* Skip the next len_protocol characters, but make sure they're + copied into the ws array. + */ + ws [wpos++] = *c++; + pos++; + } } else if (imhtml->show_smileys && (gtk_imhtml_is_smiley (imhtml, fonts, c, &smilelen) || gtk_imhtml_is_smiley(imhtml, NULL, c, &smilelen))) { GtkIMHtmlFontDetail *fd;