-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encoding on title attribute for a link tag fails #30
Comments
Blargh. Out of curiosity, would anyone care if I stopped supporting Python 2.6? |
Note to self: Nothing is ever easy. |
@jeroenp I think I've got a reasonable solution going on here. Are you able to test your code against the hotfix/unicode_title branch to confirm there aren't more edge cases? |
I was having troubles with the following link:
As you can see there are some accuted letters there. The hot fix solved for me. Is the first time I install a hotfix using
|
That's great. And yes, those pip commands are correct, though it might complain that it's lacking a |
It didn't complain about the lack of
May be is something in my local environment? It doesn't seems something to worry about. Just in case, this the version of pip I'm using:
|
Those all seem to be non-issues. Anyway, I've merged this in, and will be releasing the new version as soon as it passes through travis. |
The textile.utils generate_tags() function crashes with a UnicodeDecodeError when you use special characters on the title attribute, for example:
"Tëxtíle (Tëxtíle)":http://lala.com
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 9: ordinal not in range(128)
I tried solving the issue by encoding the inserted content, since that mixes the bytes with a unicode string that causes the decode error, but that makes textile crash somewhere in core.py:
element_tag.insert(len(element_tag) - 1, content.encode(enc))
What works for me is decoding the result from elementtree:
Platform: python 2.7.11
The text was updated successfully, but these errors were encountered: