- (let ((url-confirmation-func 'identity))
- (cond
- ((eq (car xurl) 'post)
- (pop xurl)
- (nnwarchive-fetch-form (car xurl) (nnwarchive-eval (cdr xurl))))
- (t
- (nnweb-insert (apply 'format (nnwarchive-eval xurl)))))))
-
-(defun nnwarchive-decode-entities ()
- (goto-char (point-min))
- (while (re-search-forward "&\\(#[0-9]+\\|[a-z]+\\);" nil t)
- (replace-match (char-to-string
- (if (eq (aref (match-string 1) 0) ?\#)
- (string-to-number (substring (match-string 1) 1))
- (or (cdr (assq (intern (match-string 1))
- w3-html-entities))
- ?#)))
- t t)))
-
-(defun nnwarchive-decode-entities-string (str)
- (with-temp-buffer
- (insert str)
- (nnwarchive-decode-entities)
- (buffer-substring (point-min) (point-max))))
-
-(defun nnwarchive-remove-markup ()
- (goto-char (point-min))
- (while (search-forward "<!--" nil t)
- (delete-region (match-beginning 0)
- (or (search-forward "-->" nil t)
- (point-max))))
- (goto-char (point-min))
- (while (re-search-forward "<[^>]+>" nil t)
- (replace-match "" t t)))
-
-(defun nnwarchive-date-to-date (sdate)
- (let ((elem (split-string sdate)))
- (concat (substring (nth 0 elem) 0 3) " "
- (substring (nth 1 elem) 0 3) " "
- (substring (nth 2 elem) 0 2) " "
- (substring (nth 3 elem) 1 6) " "
- (format-time-string "%Y") " "
- (nth 4 elem))))
+ (mm-with-unibyte-current-buffer
+ (let ((url-confirmation-func 'identity) ;; Some hacks.
+ (url-cookie-multiple-line nil))
+ (cond
+ ((eq (car xurl) 'post)
+ (pop xurl)
+ (mm-url-fetch-form (car xurl) (nnwarchive-eval (cdr xurl))))
+ (t
+ (mm-url-insert (apply 'format (nnwarchive-eval xurl))))))))