diff 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
line wrap: on
line diff
--- a/src/util.h	Sun May 23 22:16:25 2004 +0000
+++ b/src/util.h	Sun May 23 22:17:38 2004 +0000
@@ -579,6 +579,15 @@
  */
 const char *gaim_url_encode(const char *str);
 
+/**
+ * Checks if the given email address is syntactically valid.
+ *
+ * @param address The email address to validate.
+ *
+ * @return True if the email address is syntactically correct.
+ */
+gboolean gaim_email_is_valid(const char *address);
+
 /*@}*/
 
 /**************************************************************************