adding string-attribute.
authorDrew Crampsie <drewc@tech.coop>
Thu, 2 Feb 2006 06:59:02 +0000 (22:59 -0800)
committerDrew Crampsie <drewc@tech.coop>
Thu, 2 Feb 2006 06:59:02 +0000 (22:59 -0800)
darcs-hash:20060202065902-5417e-9e0c385d740d37dcf0d0a7ed54de56ffc12dc9f3.gz

src/standard-attributes.lisp

index 1eb244f..492a06b 100644 (file)
@@ -1,5 +1,20 @@
 (in-package :lisp-on-lines)
 
+;;;; Strings
+
+(defattribute string-attribute ()
+  ()
+  (:type-name string)
+  (:default-properties
+      :escape-html-p t))
+
+(defdisplay object (:description (string string-attribute))
+  (<:as-html "ASD")
+  (if (getp :escape-html-p)
+      (<:as-html (attribute-value object string))
+      (<:as-is (attribute-value object string))))
+
+
 (defattribute image ()
   ())