From 70af2e8e1d00755c68e8aa701b9c1419604a5395 Mon Sep 17 00:00:00 2001 From: elpolilla Date: Fri, 19 Dec 2008 11:09:51 +0000 Subject: [PATCH] Modified Unquote adaptor to make use of the new unquote_markup function instead of remove_entities --HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40538 --- scrapy/trunk/scrapy/contrib/adaptors/markup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scrapy/trunk/scrapy/contrib/adaptors/markup.py b/scrapy/trunk/scrapy/contrib/adaptors/markup.py index dab57c8d1..3964bc872 100644 --- a/scrapy/trunk/scrapy/contrib/adaptors/markup.py +++ b/scrapy/trunk/scrapy/contrib/adaptors/markup.py @@ -1,5 +1,5 @@ import re -from scrapy.utils.markup import replace_tags, remove_entities +from scrapy.utils.markup import replace_tags, unquote_markup from scrapy.item.adaptors import adaptize def remove_tags(value): @@ -29,8 +29,8 @@ def remove_root(value): class Unquote(object): """ Receives a list of strings, removes all of the - entities the strings may have, and returns - a new list + CDATAs and entities (except the ones in CDATAs) the strings + may have, and returns a new list. Input: iterable with strings Output: list of strings @@ -41,4 +41,4 @@ class Unquote(object): def __call__(self, value, keep=None): if keep is not None: self.keep = keep - return [ remove_entities(v, keep=self.keep) for v in value ] + return [ unquote_markup(v, keep=self.keep) for v in value ]