Changeset 2102:a356098c9b8b
- Timestamp:
- 07/13/10 19:46:53 (8 weeks ago)
- Author:
- Pablo Hoffman <pablo@…>
- Children:
- 2103:aa1225394076, 2105:925d03ebbefe
- Branch:
- default
- Message:
-
Applied patch to ClientForm? to fix bug with wrong entities. Also added tests and left patch in repo in case we upgrade ClientForm? in the future and need to re-apply it
- Location:
- scrapy
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r1257
|
r2102
|
|
| 242 | 242 | if name.startswith("x"): |
| 243 | 243 | name, base= name[1:], 16 |
| 244 | | uc = unichr(int(name, base)) |
| | 244 | try: |
| | 245 | uc = unichr(int(name, base)) |
| | 246 | except ValueError: |
| | 247 | # invalid literal for int() |
| | 248 | # or integer not in unichr()'s range |
| | 249 | uc = name |
| 245 | 250 | if encoding is None: |
| 246 | 251 | return uc |