Skip to content
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

UnicodeEncodeError in mongonaut_tags #79

Open
lchsk opened this issue Jun 30, 2015 · 3 comments
Open

UnicodeEncodeError in mongonaut_tags #79

lchsk opened this issue Jun 30, 2015 · 3 comments

Comments

@lchsk
Copy link
Contributor

lchsk commented Jun 30, 2015

In mongonaut_tags.py there are two similar lines:

(1) return mark_safe("""<a href="{0}">{1}</a>""".format(value, value))
(2) return mark_safe("""<a href="{0}">{1}</a>""".format(url, value.__unicode__()))

Is there a reason for using .__unicode__() in (2)? (It gives me me UnicodeEncodeError on a string that includes unicode characters. Removing .__unicode__() seems to help.)

Cheers

@garrypolley
Copy link
Collaborator

I'm not entirely sure at the moment if there is a technical reason they are different.

this was the newer of the two: 0a73202

@garrypolley
Copy link
Collaborator

Assuming it doesn't break anything I'm cool with a change to not call .__unicode__

@lchsk
Copy link
Contributor Author

lchsk commented Jul 10, 2015

I removed .__unicode__ in my local version for the project I'm currently developing. It did not break anything for what I can observe. I can prepare a pull request later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants