From 2791023eb1b5df7076503575a2986bed8e11d854 Mon Sep 17 00:00:00 2001 From: Daniel Muckerman Date: Fri, 2 Feb 2018 10:08:45 -0500 Subject: [PATCH] test escaping url For illust --- slack-pixiv.rb | 1 + slack-pixiv/commands/illust.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/slack-pixiv.rb b/slack-pixiv.rb index 8e1ddda..2a8cec7 100644 --- a/slack-pixiv.rb +++ b/slack-pixiv.rb @@ -2,6 +2,7 @@ require 'slack-ruby-bot' require 'wolfram' require 'mechanize' require 'nokogiri' +require 'uri' require 'slack-pixiv/commands/illust' require 'slack-pixiv/commands/member' require 'slack-pixiv/app' diff --git a/slack-pixiv/commands/illust.rb b/slack-pixiv/commands/illust.rb index 566ebdf..ba765e6 100644 --- a/slack-pixiv/commands/illust.rb +++ b/slack-pixiv/commands/illust.rb @@ -15,6 +15,7 @@ module SlackMathbot else pixiv_url = "http://www.pixiv.net/member_illust.php" + _match[:url][0..-1] end + pixiv_url = URI.unescape(pixiv_url) puts pixiv_url # Create iOS Illustration URL, regex pixiv_url to