Package gluon :: Module html :: Class XML
[hide private]
[frames] | no frames]

Class XML

source code

object --+
         |
        XML

example:

>>> XML('<h1>Hello</h1>').xml()
'<h1>Hello</h1>'

use it to wrap a string that contains XML/HTML so that it will not be escaped by the template

Instance Methods [hide private]
 
__init__(self, text, sanitize=False, permitted_tags=['a', 'b', 'blockquote', 'br/', 'i', 'li', 'ol', 'ul', 'p', 'c..., allowed_attributes={'a': ['href', 'title'], 'blockquote': ['type'], 'img': ['src'...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
xml(self) source code
 
__str__(self)
str(x)
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, text, sanitize=False, permitted_tags=['a', 'b', 'blockquote', 'br/', 'i', 'li', 'ol', 'ul', 'p', 'c..., allowed_attributes={'a': ['href', 'title'], 'blockquote': ['type'], 'img': ['src'...)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)