[gnus git] branch master updated: m0-7-94-g6c78ca5 =1= (shr-parse-base): Chop off the anchor before using.

Lars Magne Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  6c78ca5c6ea2e87ddde13d5c7f5894ba42711f68 (commit)
      from  3569c92640d7c40d571d48b6127909554c79cee2 (commit)


- Log -----------------------------------------------------------------
commit 6c78ca5c6ea2e87ddde13d5c7f5894ba42711f68
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Sun Jun 16 19:41:20 2013 +0200

    (shr-parse-base): Chop off the anchor before using.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 23f4aad..e6afdf2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -3,6 +3,7 @@
 	* shr.el (shr-tag-li): Don't require a new paragraph, since other
 	browsers don't.
 	(shr-expand-url): Respect #anchor links.
+	(shr-parse-base): Chop off the anchor before using.
 
 	* eww.el (eww-tag-textarea): Use `text' instead of `editable-field'.
 
diff --git a/lisp/shr.el b/lisp/shr.el
index 7c6c6a3..e10bfcd 100644
--- a/lisp/shr.el
+++ b/lisp/shr.el
@@ -493,6 +493,9 @@ size, and full-buffer size."
     (not failed)))
 
 (defun shr-parse-base (url)
+  ;; Always chop off anchors.
+  (when (string-match "#.*" url)
+    (setq url (substring url 0 (match-beginning 0))))
   (let* ((parsed (url-generic-parse-url url))
 	 (local (url-filename parsed)))
     (setf (url-filename parsed) "")

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog |    1 +
 lisp/shr.el    |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.