comparison libpurple/util.c @ 26881:795606e2f7c6

According to RFC 1738, "'" is a valid character in a URL. Thanks to the patch by shreevatsa. Closes #1310.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 16 May 2009 18:37:14 +0000
parents ab31daf1c1ee
children 9e45d860b9af
comparison
equal deleted inserted replaced
26880:22b87a82755b 26881:795606e2f7c6
1621 pt = g_new0(struct purple_parse_tag, 1); 1621 pt = g_new0(struct purple_parse_tag, 1);
1622 pt->src_tag = "a"; 1622 pt->src_tag = "a";
1623 pt->dest_tag = "a"; 1623 pt->dest_tag = "a";
1624 tags = g_list_prepend(tags, pt); 1624 tags = g_list_prepend(tags, pt);
1625 if(xhtml) 1625 if(xhtml)
1626 g_string_append_printf(xhtml, "<a href='%s'>", url ? g_strstrip(url->str) : ""); 1626 g_string_append_printf(xhtml, "<a href=\"%s\">", url ? g_strstrip(url->str) : "");
1627 continue; 1627 continue;
1628 } 1628 }
1629 if(!g_ascii_strncasecmp(c, "<font", 5) && (*(c+5) == '>' || *(c+5) == ' ')) { 1629 if(!g_ascii_strncasecmp(c, "<font", 5) && (*(c+5) == '>' || *(c+5) == ' ')) {
1630 const char *p = c + 5; 1630 const char *p = c + 5;
1631 GString *style = g_string_new(""); 1631 GString *style = g_string_new("");
2015 case '\n': 2015 case '\n':
2016 case '\r': 2016 case '\r':
2017 case '<': 2017 case '<':
2018 case '>': 2018 case '>':
2019 case '"': 2019 case '"':
2020 case '\'':
2021 return TRUE; 2020 return TRUE;
2022 default: 2021 default:
2023 return FALSE; 2022 return FALSE;
2024 } 2023 }
2025 } 2024 }