Unescape HTML from document

This commit is contained in:
Danila Fedorin 2022-03-27 21:21:44 -07:00
parent 41142b963a
commit d7a601dd5e

View File

@ -2,8 +2,10 @@ require "open3"
require "nokogiri" require "nokogiri"
require "net/http" require "net/http"
require "json" require "json"
require "cgi"
def render_cached(cache, display, string, render_comment = nil) def render_cached(cache, display, string, render_comment = nil)
string = CGI.unescapeHTML string
cache.fetch(string) do |new| cache.fetch(string) do |new|
puts " Rendering #{render_comment || new}" puts " Rendering #{render_comment || new}"
res = Net::HTTP.post URI("http://localhost:8000/render"), res = Net::HTTP.post URI("http://localhost:8000/render"),