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

Fix Title extraction in Drupal 7 import script #192

Merged
merged 2 commits into from Mar 20, 2015

Conversation

Projects
None yet
3 participants
@antonizoon

As shown in this Github Issue: Problem extracting titles from Drupal 7 site, drupal7.rb dumps a binary mess in each post instead of the Title string.

title: !binary |-
  SGVsbG8gV29ybGQ=

I have fixed this bug entirely by forcing the strings into Unicode format (and stripping any preceding and ending whitespace with strip):

'title' => title.strip.force_encoding("UTF-8"),

That way, it works even for those pesky titles with stray \xE2 junk that screws everything up.

Please merge this pull request to fix the Drupal 7 importer. Try it out.

Lawrence Wu added some commits Mar 17, 2015

Lawrence Wu
Convert Post titles into UTF-8 strings, not binary junk
This patch is designed to solve this Drupal 7 import bug: #90

where titles are dumped as ugly binary strings, and not UTF-8 strings.

parkr added a commit that referenced this pull request Mar 20, 2015

@parkr parkr merged commit d52be92 into jekyll:master Mar 20, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

parkr added a commit that referenced this pull request Mar 20, 2015

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Mar 20, 2015

Member

You're the bomb!!

Member

parkr commented Mar 20, 2015

You're the bomb!!

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Mar 20, 2015

Member

Thank you!! 🙏

Member

parkr commented Mar 20, 2015

Thank you!! 🙏

@antonizoon

This comment has been minimized.

Show comment
Hide comment
@antonizoon

antonizoon Mar 20, 2015

You're very welcome. And thanks for merging the fix.

You're very welcome. And thanks for merging the fix.

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.