[Lisppaste-cvs] CVS update: lisppaste2/encode-for-pre.lisp lisppaste2/web-server.lisp

Brian Mastenbrook bmastenbrook at common-lisp.net
Sun Mar 7 20:40:21 UTC 2004


Update of /project/lisppaste/cvsroot/lisppaste2
In directory common-lisp.net:/tmp/cvs-serv16513

Modified Files:
	encode-for-pre.lisp web-server.lisp 
Log Message:
make RSS not one big long line

Date: Sun Mar  7 15:40:20 2004
Author: bmastenbrook

Index: lisppaste2/encode-for-pre.lisp
diff -u lisppaste2/encode-for-pre.lisp:1.10 lisppaste2/encode-for-pre.lisp:1.11
--- lisppaste2/encode-for-pre.lisp:1.10	Sun Mar  7 09:18:26 2004
+++ lisppaste2/encode-for-pre.lisp	Sun Mar  7 15:40:20 2004
@@ -1,4 +1,4 @@
-;;;; $Id: encode-for-pre.lisp,v 1.10 2004/03/07 14:18:26 bmastenbrook Exp $
+;;;; $Id: encode-for-pre.lisp,v 1.11 2004/03/07 20:40:20 bmastenbrook Exp $
 ;;;; $Source: /project/lisppaste/cvsroot/lisppaste2/encode-for-pre.lisp,v $
 
 ;;;; See the LICENSE file for licensing information.
@@ -42,3 +42,6 @@
 
 (defun encode-for-tt (str)
   (replace-in-string-1 (replace-in-string str '(#\& #\< #\> #\newline #\return #\linefeed #\tab) '("&" "<" ">" "<br>" "" "" "    ")) #\space " " t))
+
+(defun encode-for-http (str)
+  (replace-in-string-1 str #\> (format nil ">~%") nil))


Index: lisppaste2/web-server.lisp
diff -u lisppaste2/web-server.lisp:1.40 lisppaste2/web-server.lisp:1.41
--- lisppaste2/web-server.lisp:1.40	Sun Mar  7 15:09:19 2004
+++ lisppaste2/web-server.lisp	Sun Mar  7 15:40:20 2004
@@ -1,4 +1,4 @@
-;;;; $Id: web-server.lisp,v 1.40 2004/03/07 20:09:19 bmastenbrook Exp $
+;;;; $Id: web-server.lisp,v 1.41 2004/03/07 20:40:20 bmastenbrook Exp $
 ;;;; $Source: /project/lisppaste/cvsroot/lisppaste2/web-server.lisp,v $
 
 ;;;; See the LICENSE file for licensing information.
@@ -190,13 +190,14 @@
                                     (encode-for-pre (paste-user paste))
                                     (if full
                                         (encode-for-pre
-                                         (araneida:html
-                                          `(p
-                                            ,(format-paste paste nil (paste-number paste))
-                                            ,@(mapcar
-                                               #'(lambda (a)
-                                                   (format-paste a nil (paste-number a) t))
-                                               (paste-annotations paste)))))
+                                         (encode-for-http
+                                          (araneida:html
+                                           `(p
+                                             ,(format-paste paste nil (paste-number paste))
+                                             ,@(mapcar
+                                                #'(lambda (a)
+                                                    (format-paste a nil (paste-number a) t))
+                                                (paste-annotations paste))))))
                                         (format nil "Paste to channel ~A with ~A annotations." (encode-for-pre (paste-channel paste)) (length (paste-annotations paste))))
                                     #\Return #\Linefeed))
                         (if discriminate-channel





More information about the Lisppaste-cvs mailing list