# HG changeset patch # User mgood # Date 1151810456 0 # Node ID 3421dd98f015eae9f1f01cad3f3b30f8a6c3921f # Parent 1fdb7054fb42ed006e3d8b721b952ace1a7361b3 quotes should not be escaped inside text nodes diff --git a/markup/builder.py b/markup/builder.py --- a/markup/builder.py +++ b/markup/builder.py @@ -131,6 +131,10 @@ >>> print Element('p')('Hello ', Element('b')('world'))

Hello world

+ Quotes are not escaped inside text nodes: + >>> print Element('p')('"Hello"') +

"Hello"

+ Elements can also be combined with other elements or strings using the addition operator, which results in a `Fragment` object that contains the operands: diff --git a/markup/core.py b/markup/core.py --- a/markup/core.py +++ b/markup/core.py @@ -239,7 +239,8 @@ return '<%s "%s">' % (self.__class__.__name__, self) def join(self, seq): - return Markup(unicode(self).join([escape(item) for item in seq])) + return Markup(unicode(self).join([escape(item, quotes=False) + for item in seq])) def stripentities(self, keepxmlentities=False): """Return a copy of the text with any character or numeric entities