URI: 
       tshow img alt text - webdump - [FORK] git://git.codemadness.org/webdump
  HTML git clone git://git.z3bra.org/webdump.git
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit 48014d5cd3f8f97438edcf6ffd7110338e5c2f3b
   DIR parent 855c8fd52cde5d086eba217b865772a2b59ac4eb
  HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Sun,  8 Dec 2019 16:23:25 +0100
       
       show img alt text
       
       Diffstat:
         M webdump.c                           |       9 +++++++++
       
       1 file changed, 9 insertions(+), 0 deletions(-)
       ---
   DIR diff --git a/webdump.c b/webdump.c
       t@@ -762,6 +762,8 @@ static void
        xmlattr(XMLParser *p, const char *tag, size_t taglen, const char *name,
                size_t namelen, const char *value, size_t valuelen)
        {
       +        struct node *cur;
       +
                if (!strcasecmp(tag, "a") && !strcasecmp(name, "href") && valuelen)
                        strlcpy(src, value, sizeof(src));
        
       t@@ -769,6 +771,13 @@ xmlattr(XMLParser *p, const char *tag, size_t taglen, const char *name,
                     !strcasecmp(tag, "audio")) &&
                    !strcasecmp(name, "src") && valuelen)
                        strlcpy(src, value, sizeof(src));
       +
       +        cur = &nodes[curnode];
       +        if (cur->tag.displaytype & DisplayNone)
       +                return;
       +        /* show img alt attribute as text. */
       +        if (!strcasecmp(tag, "img") && !strcasecmp(name, "alt"))
       +                printsafe(value, strlen(value));
        }
        
        void