pidgin/pidgin

Parents 955dcca1ac3d
Children 6917682375dd
facebook: fb_http_urlcmp: more loose comparison, to avoid showing urls twice

Now it returns true if url1 is contained inside url2, or the other way
around. This helps when a message body is compared with a url.
--- a/libpurple/protocols/facebook/http.c Sat Oct 22 04:13:02 2016 -0300
+++ b/libpurple/protocols/facebook/http.c Sat Oct 22 04:17:53 2016 -0300
@@ -396,6 +396,10 @@
return url1 == url2;
}
+ if (strstr(url1, url2) != NULL || strstr(url2, url1) != NULL) {
+ return TRUE;
+ }
+
purl1 = purple_http_url_parse(url1);
if (purl1 == NULL) {