]> sjero.net Git - wget/blobdiff - src/html-url.c
[svn] Gettext-ize previously missed messages.
[wget] / src / html-url.c
index 89b93539d65f926c26997b76bec953fb26faecce..853226d939da7c981b61bb6b86f7c6b1afe564c4 100644 (file)
@@ -45,6 +45,7 @@ so, delete this exception statement from your version.  */
 #include "utils.h"
 #include "hash.h"
 #include "convert.h"
+#include "recur.h"             /* declaration of get_urls_html */
 
 #ifndef errno
 extern int errno;
@@ -480,6 +481,10 @@ tag_handle_link (int tagid, struct taginfo *tag, struct map_context *ctx)
              && (0 == strcasecmp (rel, "stylesheet")
                  || 0 == strcasecmp (rel, "shortcut icon")))
            up->link_inline_p = 1;
+         else
+           /* The external ones usually point to HTML pages, such as
+              <link rel="next" href="..."> */
+           up->link_expect_html = 1;
        }
     }
 }
@@ -599,7 +604,7 @@ get_urls_html (const char *file, const char *url, int *meta_disallow_follow)
       logprintf (LOG_NOTQUIET, "%s: %s\n", file, strerror (errno));
       return NULL;
     }
-  DEBUGP (("Loaded %s (size %ld).\n", file, fm->length));
+  DEBUGP (("Loaded %s (size %s).\n", file, number_to_static_string (fm->length)));
 
   ctx.text = fm->content;
   ctx.head = ctx.tail = NULL;
@@ -612,9 +617,12 @@ get_urls_html (const char *file, const char *url, int *meta_disallow_follow)
     init_interesting ();
 
   /* Specify MHT_TRIM_VALUES because of buggy HTML generators that
-     generate <a href=" foo"> instead of <a href="foo"> (Netscape
-     ignores spaces as well.)  If you really mean space, use &32; or
-     %20.  */
+     generate <a href=" foo"> instead of <a href="foo"> (browsers
+     ignore spaces as well.)  If you really mean space, use &32; or
+     %20.  MHT_TRIM_VALUES also causes squashing of embedded newlines,
+     e.g. in <img src="foo.[newline]html">.  Such newlines are also
+     ignored by IE and Mozilla and are presumably introduced by
+     writing HTML with editors that force word wrap.  */
   flags = MHT_TRIM_VALUES;
   if (opt.strict_comments)
     flags |= MHT_STRICT_COMMENTS;
@@ -648,7 +656,7 @@ get_urls_file (const char *file)
       logprintf (LOG_NOTQUIET, "%s: %s\n", file, strerror (errno));
       return NULL;
     }
-  DEBUGP (("Loaded %s (size %ld).\n", file, fm->length));
+  DEBUGP (("Loaded %s (size %s).\n", file, number_to_static_string (fm->length)));
 
   head = tail = NULL;
   text = fm->content;
@@ -694,7 +702,7 @@ get_urls_file (const char *file)
       url = url_parse (url_text, &up_error_code);
       if (!url)
        {
-         logprintf (LOG_NOTQUIET, "%s: Invalid URL %s: %s\n",
+         logprintf (LOG_NOTQUIET, _("%s: Invalid URL %s: %s\n"),
                     file, url_text, url_error (up_error_code));
          xfree (url_text);
          continue;