diff options
author | re4k <re4k@re4k.info> | 2013-04-01 03:59:33 +0900 |
---|---|---|
committer | re4k <re4k@re4k.info> | 2013-04-01 03:59:33 +0900 |
commit | 90d8845257404bb445d7611f9e9c7828ec25dc34 (patch) | |
tree | 6f3d19afa530f4e9d502e55c36d64202c2878ac5 /client | |
parent | 27bf5349f62ce11763441eb2aa8e69ee10bf9987 (diff) | |
download | aclog-90d8845257404bb445d7611f9e9c7828ec25dc34.tar.gz |
Add importing favs feature(partial: only status_activity).
Refactor models
Diffstat (limited to 'client')
-rw-r--r-- | client/worker.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/worker.rb b/client/worker.rb index 951b8f7..17c22e4 100644 --- a/client/worker.rb +++ b/client/worker.rb @@ -15,6 +15,8 @@ class Worker @pac = MessagePack::Unpacker.new end + def escape_colon(str); str.gsub(":", "%3A").gsub("<", "%3C").gsub(">", "%3E"); end + def format_text(status) chars = status[:text].to_s.split(//) @@ -39,13 +41,11 @@ class Worker result.flatten.join end - def escape_colon(str); str.gsub(":", "%3A").gsub("<", "%3C").gsub(">", "%3E"); end - def format_source(status) if status[:source].index("<a") url = status[:source].scan(/href="(.+?)"/).flatten.first name = status[:source].scan(/>(.+?)</).flatten.first - "<url:#{CGI.escape(url)}:#{CGI.escape(name)}>" + "<url:#{escapecolon(url)}:#{escapecolon(name)}>" else status[:source] end |