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
Unescaping HTML in WordPress tags and categories. #2578
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes my case.
Worked for me with Python 3.5 and code looks sane to me aswell. Thank you @felixfontein! |
Good to hear! I'd like @Kwpolska to also take a look, especially at the function in |
|
||
|
||
# http://stackoverflow.com/a/2087433 | ||
if sys.version_info[0] == 3 and sys.version_info[1] >= 4: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaks with Python 4.0.
I’d suggest:
try:
import html
html_unescape = html.unescape
except (AttributeError, ImportError):
try:
# the whole ordeal
Or even don’t use html.unescape and always define our own.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that sounds better. About defining my own: doesn't sound like a very appealing idea to me.
e49fb3e
to
1f273f1
Compare
Fixes #2557.
@okin: can you test this with your older export?