about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--CHANGES7
-rw-r--r--lynx.cfg7
-rw-r--r--lynx.man9
-rw-r--r--src/LYGlobalDefs.h3
-rw-r--r--src/LYList.c5
-rw-r--r--src/LYMain.c7
-rw-r--r--src/LYReadCFG.c3
-rw-r--r--src/LYrcFile.h3
8 files changed, 31 insertions, 13 deletions
diff --git a/CHANGES b/CHANGES
index 71064c2d..b82c16d9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,9 +1,12 @@
--- $LynxId: CHANGES,v 1.1037 2020/01/23 01:20:57 tom Exp $
+-- $LynxId: CHANGES,v 1.1038 2020/02/23 22:04:08 tom Exp $
 ===============================================================================
 Changes since Lynx 2.8 release
 ===============================================================================
 
-2020-01-22 (2.9.0dev.5)
+2020-02-23 (2.9.0dev.5)
+* add "-list_decoded" option to toggle feature of "-dump" option which decodes
+  URL-encoded links in the list of "References", from change made in
+  2.8.8dev.17, for Debian #398274 (prompted by patch by Hiltjo Posthuma) -TD
 * modify HTAddXpand() to provide for the case when the command is a full
   pathname with embedded blanks, etc., versus an expansion of an environment
   variable containing parameters (report by Edward McGuire) -TD
diff --git a/lynx.cfg b/lynx.cfg
index 5e228e6a..c0bcc8b7 100644
--- a/lynx.cfg
+++ b/lynx.cfg
@@ -1,4 +1,4 @@
-# $LynxId: lynx.cfg,v 1.311 2019/08/28 22:59:25 tom Exp $
+# $LynxId: lynx.cfg,v 1.312 2020/02/23 22:07:29 tom Exp $
 # lynx.cfg file.
 # The default placement for this file is /usr/local/lib/lynx.cfg (Unix)
 #                                     or Lynx_Dir:lynx.cfg (VMS)
@@ -3845,3 +3845,8 @@ COLOR:6:brightred:black
 # HTTP 1.0 suggested a redirection-limit of 5; lynx doubled that.  Some users
 # believe they can improve their experience with a higher limit.
 #REDIRECTION_LIMIT:10
+
+.h1 Appearance
+.h2 LIST_DECODED
+# For -dump, show URL-encoded links decoded.
+#LIST_DECODED:TRUE
diff --git a/lynx.man b/lynx.man
index a4360e6d..53824ace 100644
--- a/lynx.man
+++ b/lynx.man
@@ -1,8 +1,6 @@
-.\" $LynxId: lynx.man,v 1.125 2019/09/18 22:20:44 Steffen.Nurpmeso Exp $
+.\" $LynxId: lynx.man,v 1.126 2020/02/23 21:57:02 tom Exp $
 .\" **************************************************************************
 .\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds AQ \(aq
-.el       .ds AQ '
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 .ie \n(.g .ds '' \(rq
@@ -444,6 +442,9 @@ do justification of text.
 .B \-link\fR=\fINUMBER
 starting count for lnk#.dat files produced by \fB\-crawl\fR.
 .TP
+.B \-list_decoded
+for \fB\-dump\fR, show URL-encoded links decoded.
+.TP
 .B \-list_inline
 for \fB\-dump\fR, show the links inline with the text.
 .TP
@@ -818,7 +819,7 @@ works the same as dump but outputs HTML source instead of
 formatted text.
 For example
 .NS
-lynx \-source . >foo.html
+lynx \-source\ .\ >foo.html
 .NE
 .IP
 generates HTML source listing the files in the current directory.
diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h
index 5bf1f2e4..0a09a929 100644
--- a/src/LYGlobalDefs.h
+++ b/src/LYGlobalDefs.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYGlobalDefs.h,v 1.151 2019/09/18 22:20:44 Steffen.Nurpmeso Exp $
+ * $LynxId: LYGlobalDefs.h,v 1.152 2020/02/23 21:20:05 tom Exp $
  *
  * global variable definitions
  */
@@ -234,6 +234,7 @@ extern "C" {
     extern BOOLEAN LYcase_sensitive;	/* TRUE to turn on case sensitive search */
     extern BOOLEAN check_mail;	/* TRUE to report unread/new mail messages */
     extern BOOLEAN child_lynx;	/* TRUE to exit with an arrow */
+    extern BOOLEAN dump_links_decoded;
     extern BOOLEAN dump_links_inline;
     extern BOOLEAN dump_links_only;
     extern BOOLEAN dump_output_immediately;
diff --git a/src/LYList.c b/src/LYList.c
index 71633fc4..989b6a36 100644
--- a/src/LYList.c
+++ b/src/LYList.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYList.c,v 1.54 2018/06/10 20:27:01 tom Exp $
+ * $LynxId: LYList.c,v 1.55 2020/02/23 21:20:05 tom Exp $
  *
  *			Lynx Document Reference List Support	      LYList.c
  *			====================================
@@ -294,7 +294,8 @@ static int print_refs(FILE *fp, int titles, int refs)
 		    fprintf(fp, "%s\n", title);
 		} else {
 		    address = HTAnchor_short_address(dest);
-		    if (LYCharSet_UC[current_char_set].enc == UCT_ENC_UTF8) {
+		    if (dump_links_decoded
+			&& LYCharSet_UC[current_char_set].enc == UCT_ENC_UTF8) {
 			(void) HTUnEscape(address);
 		    }
 		    fprintf(fp, "%s\n", address);
diff --git a/src/LYMain.c b/src/LYMain.c
index 6d51ef13..90581881 100644
--- a/src/LYMain.c
+++ b/src/LYMain.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYMain.c,v 1.287 2020/01/21 22:19:23 tom Exp $
+ * $LynxId: LYMain.c,v 1.288 2020/02/23 21:20:05 tom Exp $
  */
 #include <HTUtils.h>
 #include <HTTP.h>
@@ -209,6 +209,7 @@ BOOLEAN bold_name_anchors = FALSE;
 BOOLEAN LYcase_sensitive = CASE_SENSITIVE_ALWAYS_ON;
 BOOLEAN check_mail = CHECKMAIL;
 BOOLEAN child_lynx = FALSE;
+BOOLEAN dump_links_decoded = TRUE;
 BOOLEAN dump_links_inline = FALSE;
 BOOLEAN dump_links_only = FALSE;
 BOOLEAN dump_output_immediately = FALSE;
@@ -3620,6 +3621,10 @@ soon as they are seen)"
       "=NUMBER\nstarting count for lnk#.dat files produced by -crawl"
    ),
    PARSE_SET(
+      "list_decoded",	4|TOGGLE_ARG,		dump_links_decoded,
+      "with -dump, forces it to decode URL-encoded links"
+   ),
+   PARSE_SET(
       "list_inline",	4|TOGGLE_ARG,		dump_links_inline,
       "with -dump, forces it to show links inline with text"
    ),
diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c
index a73a14d8..78dc94d8 100644
--- a/src/LYReadCFG.c
+++ b/src/LYReadCFG.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYReadCFG.c,v 1.196 2020/01/21 21:33:37 tom Exp $
+ * $LynxId: LYReadCFG.c,v 1.197 2020/02/23 21:15:14 tom Exp $
  */
 #ifndef NO_RULES
 #include <HTRules.h>
@@ -1574,6 +1574,7 @@ static Config_Type Config_Table [] =
      PARSE_FUN(RC_KEYMAP,               keymap_fun),
      PARSE_SET(RC_LEFTARROW_IN_TEXTFLD_PROMPT, textfield_prompt_at_left_edge),
      PARSE_SET(RC_LISTONLY,             dump_links_only),
+     PARSE_SET(RC_LIST_DECODED,         dump_links_decoded),
 #ifndef VMS
      PARSE_STR(RC_LIST_FORMAT,          list_format),
 #endif
diff --git a/src/LYrcFile.h b/src/LYrcFile.h
index 0397b7de..19530ecc 100644
--- a/src/LYrcFile.h
+++ b/src/LYrcFile.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYrcFile.h,v 1.54 2019/08/24 00:08:45 tom Exp $
+ * $LynxId: LYrcFile.h,v 1.55 2020/02/23 21:13:14 tom Exp $
  */
 #ifndef LYRCFILE_H
 #define LYRCFILE_H
@@ -127,6 +127,7 @@
 #define RC_LEFTARROW_IN_TEXTFLD_PROMPT  "leftarrow_in_textfield_prompt"
 #define RC_LINEEDIT_MODE                "lineedit_mode"
 #define RC_LISTONLY                     "listonly"
+#define RC_LIST_DECODED                 "list_decoded"
 #define RC_LIST_FORMAT                  "list_format"
 #define RC_LIST_INLINE                  "list_inline"
 #define RC_LIST_NEWS_DATES              "list_news_dates"