Browse Source

update to cgi escape html

master
Daniel Muckerman 6 years ago
parent
commit
8e75b95682
3 changed files with 4 additions and 3 deletions
  1. +1
    -1
      slack-pixiv.rb
  2. +1
    -1
      slack-pixiv/commands/illust.rb
  3. +2
    -1
      slack-pixiv/commands/member.rb

+ 1
- 1
slack-pixiv.rb View File

@ -2,7 +2,7 @@ require 'slack-ruby-bot'
require 'wolfram'
require 'mechanize'
require 'nokogiri'
require 'uri'
require 'cgi'
require 'slack-pixiv/commands/illust'
require 'slack-pixiv/commands/member'
require 'slack-pixiv/app'

+ 1
- 1
slack-pixiv/commands/illust.rb View File

@ -15,7 +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)
pixiv_url = CGI.unescapeHTML(pixiv_url)
puts pixiv_url
# Create iOS Illustration URL, regex pixiv_url to

+ 2
- 1
slack-pixiv/commands/member.rb View File

@ -8,7 +8,8 @@ module SlackMathbot
agent = Mechanize.new
pixiv_url = "http://www.pixiv.net/member.php" + _match[:url][0..-2]
pixiv_url = CGI.unescapeHTML(pixiv_url)
puts pixiv_url
# Scrape page title
title = agent.get(pixiv_url).title

Loading…
Cancel
Save