X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=src%2Fhtml-url.c;h=bb2b20e316b3db9896bee39ee1c4df84830a5435;hb=b8f036d16c508efde5bacfab9a96d8b6c6aeeeb2;hp=55563e2d3fc2aa9e5bd804999b3e33533f456f6d;hpb=0aa3c5d33c5faa8902fa638c36314deae45460f3;p=wget diff --git a/src/html-url.c b/src/html-url.c index 55563e2d..bb2b20e3 100644 --- a/src/html-url.c +++ b/src/html-url.c @@ -79,7 +79,10 @@ enum { TAG_SCRIPT, TAG_TABLE, TAG_TD, - TAG_TH + TAG_TH, + TAG_VIDEO, + TAG_AUDIO, + TAG_SOURCE }; /* The list of known tags and functions used for handling them. Most @@ -110,7 +113,10 @@ static struct known_tag { { TAG_SCRIPT, "script", tag_find_urls }, { TAG_TABLE, "table", tag_find_urls }, { TAG_TD, "td", tag_find_urls }, - { TAG_TH, "th", tag_find_urls } + { TAG_TH, "th", tag_find_urls }, + { TAG_VIDEO, "video", tag_find_urls }, + { TAG_AUDIO, "audio", tag_find_urls }, + { TAG_SOURCE, "source", tag_find_urls } }; /* tag_url_attributes documents which attributes of which tags contain @@ -157,7 +163,12 @@ static struct { { TAG_SCRIPT, "src", ATTR_INLINE }, { TAG_TABLE, "background", ATTR_INLINE }, { TAG_TD, "background", ATTR_INLINE }, - { TAG_TH, "background", ATTR_INLINE } + { TAG_TH, "background", ATTR_INLINE }, + { TAG_VIDEO, "src", ATTR_INLINE }, + { TAG_VIDEO, "poster", ATTR_INLINE }, + { TAG_AUDIO, "src", ATTR_INLINE }, + { TAG_AUDIO, "poster", ATTR_INLINE }, + { TAG_SOURCE, "src", ATTR_INLINE } }; /* The lists of interesting tags and attributes are built dynamically, @@ -804,6 +815,13 @@ get_urls_file (const char *file) url_text = merged; } + char *new_url = rewrite_shorthand_url (url_text); + if (new_url) + { + xfree (url_text); + url_text = new_url; + } + url = url_parse (url_text, &up_error_code, NULL, false); if (!url) { @@ -830,7 +848,7 @@ get_urls_file (const char *file) return head; } -static void +void cleanup_html_url (void) { /* Destroy the hash tables. The hash table keys and values are not