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

Unescaping HTML in WordPress tags and categories. #2578

Merged
merged 3 commits into from Dec 17, 2016

Conversation

@felixfontein
Copy link
Contributor

felixfontein commented Dec 4, 2016

Fixes #2557.

@okin: can you test this with your older export?

@okin
okin approved these changes Dec 17, 2016
Copy link
Member

okin left a comment

Fixes my case.

@okin
Copy link
Member

okin commented Dec 17, 2016

Worked for me with Python 3.5 and code looks sane to me aswell.

Thank you @felixfontein!

@felixfontein felixfontein requested a review from Kwpolska Dec 17, 2016
@felixfontein
Copy link
Contributor Author

felixfontein commented Dec 17, 2016

Good to hear! I'd like @Kwpolska to also take a look, especially at the function in utils, before we merge.



# http://stackoverflow.com/a/2087433
if sys.version_info[0] == 3 and sys.version_info[1] >= 4:

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska Dec 17, 2016

Member

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.

This comment has been minimized.

Copy link
@felixfontein

felixfontein Dec 17, 2016

Author Contributor

Yeah, that sounds better. About defining my own: doesn't sound like a very appealing idea to me.

@felixfontein felixfontein force-pushed the wordpress-import-unescape-tags branch from e49fb3e to 1f273f1 Dec 17, 2016
@felixfontein felixfontein merged commit 3c45cd9 into master Dec 17, 2016
3 of 5 checks passed
3 of 5 checks passed
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
codacy/pr Good work! A positive pull request.
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@Kwpolska Kwpolska deleted the wordpress-import-unescape-tags branch May 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.