dest->len - href_offset,
&url_found, &displayed_url);
+ if (url_found) {
+ url->flags |= RSPAMD_URL_FLAG_DISPLAY_URL;
+ }
if (exceptions && url_found) {
ex = rspamd_mempool_alloc (pool,
sizeof (*ex));
RSPAMD_URL_FLAG_SCHEMALESS = 1 << 15,
RSPAMD_URL_FLAG_UNNORMALISED = 1 << 16,
RSPAMD_URL_FLAG_ZW_SPACES = 1 << 17,
+ RSPAMD_URL_FLAG_DISPLAY_URL = 1 << 18,
};
struct rspamd_url_tag {
* - `schemaless`: URL has no schema
* - `unnormalised`: URL has some unicode unnormalities
* - `zw_spaces`: URL has some zero width spaces
+ * - `url_displayed`: URL has some other url-like string in visible part
* @return {table} URL flags
*/
#define PUSH_FLAG(fl, name) do { \
PUSH_FLAG (RSPAMD_URL_FLAG_SCHEMALESS, "schemaless");
PUSH_FLAG (RSPAMD_URL_FLAG_UNNORMALISED, "unnormalised");
PUSH_FLAG (RSPAMD_URL_FLAG_ZW_SPACES, "zw_spaces");
+ PUSH_FLAG (RSPAMD_URL_FLAG_DISPLAY_URL, "url_displayed");
}
else {
return luaL_error (L, "invalid arguments");