aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_html.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-03-20 14:44:06 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-03-20 14:44:06 +0000
commit198e242157ed81b871671f6a77e3d525a57350a5 (patch)
tree512cd26e47ab890000f2fc47fce9513e9f743004 /src/lua/lua_html.c
parentb67c7cadcfc5bd0840440a31993c145fc7278483 (diff)
downloadrspamd-198e242157ed81b871671f6a77e3d525a57350a5.tar.gz
rspamd-198e242157ed81b871671f6a77e3d525a57350a5.zip
[Feature] Treat all tags with HREF as a potential hyperlinks
Diffstat (limited to 'src/lua/lua_html.c')
-rw-r--r--src/lua/lua_html.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lua/lua_html.c b/src/lua/lua_html.c
index 1b5828564..39a4a77a0 100644
--- a/src/lua/lua_html.c
+++ b/src/lua/lua_html.c
@@ -616,6 +616,10 @@ lua_html_tag_get_flags (lua_State *L)
lua_pushstring (L, "closing");
lua_rawseti (L, -2, i++);
}
+ if (tag->flags & FL_HREF) {
+ lua_pushstring (L, "href");
+ lua_rawseti (L, -2, i++);
+ }
if (tag->flags & FL_CLOSED) {
lua_pushstring (L, "closed");
lua_rawseti (L, -2, i++);
@@ -692,7 +696,7 @@ lua_html_tag_get_extra (lua_State *L)
if (tag) {
if (tag->extra) {
- if (tag->id == Tag_A || tag->id == Tag_IFRAME || tag->id == Tag_LINK) {
+ if (tag->flags & FL_HREF) {
/* For A that's URL */
purl = lua_newuserdata (L, sizeof (gpointer));
*purl = tag->extra;