~ubuntu-branches/ubuntu/intrepid/mew-beta/intrepid

« back to all changes in this revision

Viewing changes to mew-highlight.el

  • Committer: Bazaar Package Importer
  • Author(s): Tatsuya Kinoshita
  • Date: 2007-04-23 20:51:39 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20070423205139-m5xqwnskzdar9cmu
Tags: 5.2.50~0.20070423-1
* New upstream release. (CVS trunk on 2007-04-23)
  - Preventing APOP attack. [CVE-2007-1558]
* debian/emacsen-install.in: Rename path.el to __path.el.

Show diffs side-by-side

added added

removed removed

Lines of Context:
160
160
           (url-regex mew-regex-url)
161
161
           (fancy-num 0)
162
162
           (fancy-length (length mew-highlight-body-cite-faces))
163
 
           beg end face fancy-alst fancy-prefix)
 
163
           beg end face fancy-alst fancy-prefix idn url)
164
164
      (save-excursion
165
165
        (mew-elet
166
166
         (when draft
195
195
         (when mew-use-highlight-url
196
196
           (goto-char BEG)
197
197
           (while (and (<= (point) END) (re-search-forward url-regex END t))
198
 
             (setq beg (match-beginning 0))
199
 
             (setq end (match-end 0))
200
 
             (put-text-property beg end 'face 'mew-face-body-url)
201
 
             (put-text-property
202
 
              beg end 'mouse-face mew-highlight-url-mouse-face))))))))
 
198
             (save-restriction
 
199
               (setq beg (match-beginning 0))
 
200
               (setq end (match-end 0))
 
201
               (narrow-to-region beg end)
 
202
               (goto-char (point-min))
 
203
               (setq url (mew-buffer-substring (point-min) (point-max)))
 
204
               (while (and mew-use-punycode (re-search-forward mew-regex-punycode nil t))
 
205
                 (setq idn (mew-puny-decode (mew-buffer-substring (match-beginning 0) (match-end 0))))
 
206
                 (when idn
 
207
                   (delete-region (match-beginning 0) (match-end 0))
 
208
                   (insert idn)))
 
209
               (goto-char (point-max))
 
210
               (put-text-property (point-min) (point-max) 'mew-url url)
 
211
               (put-text-property (point-min) (point-max) 'face 'mew-face-body-url)
 
212
               (put-text-property
 
213
                (point-min) (point-max) 'mouse-face mew-highlight-url-mouse-face)
 
214
               (setq END (- END (- end (point-max))))))))))))
203
215
 
204
216
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
205
217
;;;
345
357
 
346
358
;;; Copyright Notice:
347
359
 
348
 
;; Copyright (C) 1997-2006 Mew developing team.
 
360
;; Copyright (C) 1997-2007 Mew developing team.
349
361
;; All rights reserved.
350
362
 
351
363
;; Redistribution and use in source and binary forms, with or without