Removed ClientForm with its patch and tests, and BeautifulSoup

This commit is contained in:
Lucian Ursu 2012-04-10 10:24:30 +03:00
parent df2e795278
commit 4be6c22c4d
4 changed files with 0 additions and 5445 deletions

View File

@ -1,8 +0,0 @@
import unittest
from scrapy.xlib import ClientForm
class ClientFormPatchTests(unittest.TestCase):
def test_patched_unescape_charref(self):
self.assertEqual(ClientForm.unescape_charref('c', 'utf-8'), 'c')

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +0,0 @@
diff --git a/scrapy/xlib/ClientForm.py b/scrapy/xlib/ClientForm.py
--- a/scrapy/xlib/ClientForm.py
+++ b/scrapy/xlib/ClientForm.py
@@ -242,5 +242,10 @@ def unescape_charref(data, encoding):
if name.startswith("x"):
name, base= name[1:], 16
- uc = unichr(int(name, base))
+ try:
+ uc = unichr(int(name, base))
+ except ValueError:
+ # invalid literal for int()
+ # or integer not in unichr()'s range
+ uc = name
if encoding is None:
return uc

File diff suppressed because it is too large Load Diff