st = parse_semicolon;
SET_U (u, UF_SCHEMA);
}
+ else if (!g_ascii_isalnum (t) && t != '+' && t != '-') {
+ if (!strict && p > c) {
+ /* We might have some domain, but no protocol */
+ st = parse_domain;
+ p = c;
+ break;
+ }
+ else {
+ goto out;
+ }
+ }
p ++;
break;
case parse_semicolon:
if (!g_unichar_isalnum (uc)) {
/* Bad symbol */
- goto out;
+ if (strict) {
+ goto out;
+ }
+ else {
+ goto set;
+ }
}
p = g_utf8_next_char (p);
m.add_prefix = FALSE;
if (matcher->start (begin, end, pos,
&m) && matcher->end (begin, end, pos, &m)) {
- if (m.add_prefix) {
+ if (m.add_prefix || matcher->prefix[0] != '\0') {
l = m.m_len + 1 + strlen (m.prefix);
*url_str = rspamd_mempool_alloc (pool, l);
rspamd_snprintf (*url_str,