Edgewall Software

Opened 16 years ago

Last modified 16 years ago

#202 closed enhancement

Markup should be interoperable with other stuff — at Version 1

Reported by: ianb@… Owned by: cmlenz
Priority: major Milestone: 0.5
Component: Template processing Version:
Keywords: Cc: ianb@…, ben@…

Description (last modified by cmlenz)

The Markup class can't be interoperable with other classes. Specifically in WebHelpers? we want to implement our own HTML literal class, basically equivalent to Markup('<tags>'). Our object has a method .__html__(), that both indicates the object is a literal, and can be used to give an HTML representation of the object.

To work with this, Markup.escape would have to test for this attribute. Right now it does an exact class check (even subclasses won't work). We can't even do any kind of conditional mix-in.

If the Markup class also provides an __html__ method, we could also support using Markup as a way of providing HTML literals in our own quoting code.

Also, Markup(0) == '', while Markup(1) == '1'.

Change History (1)

comment:1 Changed 16 years ago by cmlenz

  • Description modified (diff)

(description formatting fixes)

Note: See TracTickets for help on using tickets.