From d978354e88e7709275b2f2a06d9b0b05c7802c8e Mon Sep 17 00:00:00 2001 From: Brian 'Redbeard' Harrington Date: Tue, 7 Dec 2021 17:42:55 -0800 Subject: feature: Support data-src and data-srcset for img Increasingly HTML5 sites use a number of mechanisms for responsive image loading. Many of these mechanisms revolve around the use of `data-src` and `data-srcset` attributes within an img tag to provide a list of valid images to display, along with their relevant sizes (e.g. https://github.com/aFarkas/lazysizes, https://github.com/malchata/yall.js ). This change adds the two previously mentioned tags to the list in `hts_detect[]`, resulting in httrack detecting them correctly. Initially an attempt was made at using `hts_detectbeg[]` with the potential of resolving #203. Unfortunately it became apparent that the implementation of `hts_detectbeg[]` only supports a suffix of integers (see `src/htstools.h#rech_tageqbegdigits` for more information). --- src/htslib.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/htslib.c') diff --git a/src/htslib.c b/src/htslib.c index 92c7d44..b5df95b 100644 --- a/src/htslib.c +++ b/src/htslib.c @@ -115,6 +115,8 @@ const char *hts_detect[] = { "archive", "background", "data", // OBJECT + "data-src", + "data-srcset", "dynsrc", "lowsrc", "profile", // element META -- cgit v1.2.3