diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-22 22:45:36 -0500 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-22 22:45:36 -0500 |
commit | 1c32da9882d056fee65d8c2aa44ecacfc21eb758 (patch) | |
tree | 1a0e636e6f5e40da75a6fca2613e773578c45112 /beautifulsoup/dammit.py | |
parent | f42fef27dc82ce97df0cb7b254595e6771461637 (diff) |
Don't turn " into " except in attribute values.
Diffstat (limited to 'beautifulsoup/dammit.py')
-rw-r--r-- | beautifulsoup/dammit.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/beautifulsoup/dammit.py b/beautifulsoup/dammit.py index 67bec17..c2ba1fc 100644 --- a/beautifulsoup/dammit.py +++ b/beautifulsoup/dammit.py @@ -35,6 +35,11 @@ class EntitySubstitution(object): lookup = {} characters = [] for codepoint, name in codepoint2name.items(): + if codepoint == 34: + # There's no point in turning the quotation mark into + # " except in attribute values, which are handled + # separately. + continue; character = unichr(codepoint) characters.append(character) lookup[character] = name |