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

Fix Title extraction in Drupal 7 import script #192

Merged
merged 2 commits into from
Mar 20, 2015

Conversation

antonizoon
Copy link

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 2 commits March 17, 2015 12:22
This patch is designed to solve this Drupal 7 import bug: jekyll#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
parkr added a commit that referenced this pull request Mar 20, 2015
@parkr
Copy link
Member

parkr commented Mar 20, 2015

You're the bomb!!

@parkr
Copy link
Member

parkr commented Mar 20, 2015

Thank you!! 🙏

@antonizoon
Copy link
Author

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants