Changeset 12508 in project


Ignore:
Timestamp:
11/15/08 14:15:55 (11 years ago)
Author:
azul
Message:

Implementing stream-html-escape.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/3/html-stream/trunk/html-stream-base.scm

    r3706 r12508  
    11(use srfi-40 stream-ext stream-parser)
    22
    3 (declare (export validate-param remove-comments text->html-id))
     3(declare (export validate-param remove-comments text->html-id stream-html-escape))
    44
    55(define (validate-param str)
     
    3030               (not (stream-null? rest))
    3131               (char=? (stream-car rest) #\-))
    32         rest   
     32        rest
    3333        (stream-cons x rest)))
    3434    stream-null
     
    4545                  #\-))
    4646              text)))))))
     47
     48(define (stream-html-escape in)
     49  (stream-delay (stream-replace (->stream-char in) '((#\< "&lt;") (#\& "&amp;")))))
Note: See TracChangeset for help on using the changeset viewer.