From 6d7422139b7a60f48761f9a8ef52ed3de7393287 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Tue, 22 Feb 2011 22:56:09 -0500 Subject: Solved the question of how to decide between ' (XML) and &squot; (HTML) by cutting the Gordian knot: quote the *double* quotes, which are always ". --- beautifulsoup/element.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'beautifulsoup/element.py') diff --git a/beautifulsoup/element.py b/beautifulsoup/element.py index 0ef9db1..23f8c33 100644 --- a/beautifulsoup/element.py +++ b/beautifulsoup/element.py @@ -582,8 +582,7 @@ class Tag(PageElement, EntitySubstitution): and '%SOUP-ENCODING%' in val): val = self.substituteEncoding(val, eventual_encoding) - # XXX: Set destination_is_xml based on... something! - decoded = key + '=' + self.substitute_xml(val, True, False) + decoded = key + '=' + self.substitute_xml(val, True) attrs.append(decoded) close = '' closeTag = '' -- cgit v1.2.3