mirror of https://github.com/scrapy/scrapy.git
Removed ClientForm with its patch and tests, and BeautifulSoup
This commit is contained in:
parent
df2e795278
commit
4be6c22c4d
|
|
@ -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
|
|
@ -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
Loading…
Reference in New Issue