comparison src/util.h @ 9045:38d022e5eb19

[gaim-migrate @ 9821] nosnilmot wrote: " This patch prevents turning strings with '@' in them into mailto: links if they are not valid email addresses. An example would be copying from a shell something like: [user@host dir]$ thing would create a mailto link to "[user@host" It adds a gaim_email_is_valid function to util.c which could also be used elsewhere :) Thanks to Alver on #gaim for reporting this buglet." And also said: "Updated patch attached, tested against 86,171 valid email addresses and as many invalid addresses as I could make up" committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Sun, 23 May 2004 22:17:38 +0000
parents b540c735a6ad
children 66027eb31f97
comparison
equal deleted inserted replaced
9044:23bcfdcd530d 9045:38d022e5eb19
577 * 577 *
578 * @return The resulting string. 578 * @return The resulting string.
579 */ 579 */
580 const char *gaim_url_encode(const char *str); 580 const char *gaim_url_encode(const char *str);
581 581
582 /**
583 * Checks if the given email address is syntactically valid.
584 *
585 * @param address The email address to validate.
586 *
587 * @return True if the email address is syntactically correct.
588 */
589 gboolean gaim_email_is_valid(const char *address);
590
582 /*@}*/ 591 /*@}*/
583 592
584 /************************************************************************** 593 /**************************************************************************
585 * UTF8 String Functions 594 * UTF8 String Functions
586 **************************************************************************/ 595 **************************************************************************/