Skip to content

Commit

Permalink
Moving encoding to curtitle function, to make it more generalized (al…
Browse files Browse the repository at this point in the history
…so used by clip_again etc)
  • Loading branch information
houshuang committed Jun 21, 2013
1 parent 8c8bdd5 commit 90b04a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dokuwiki.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def cururl
end

def curtitle
title = @chrome.windows[1].get.tabs[@chrome.windows[1].get.active_tab_index.get].get.title.get.strip
title = @chrome.windows[1].get.tabs[@chrome.windows[1].get.active_tab_index.get].get.title.get.strip.force_encoding("UTF-8")
end

# gets the bibtex from the current page, whether it's google scholar, researchr or scrobblr, and cleans it up
Expand Down Expand Up @@ -294,7 +294,7 @@ def do_clip(pagename, titletxt, onlytext = false)

def clip
require 'pashua'
title = curtitle.strip.force_encoding("UTF-8")
title = curtitle

# asks for a page name, and appends selected text on current page to that wiki page, with proper citation
gui = "
Expand Down

0 comments on commit 90b04a1

Please sign in to comment.