Project

General

Profile

Defect #13138 » htmlentities_delete_r11398.diff

Jun NAITOH, 2013-02-15 13:25

View differences:

lib/plugins/rfpdf/init.rb (working copy)
begin
require('htmlentities')
rescue LoadError
# This gem is not required - just nice to have.
end
require('cgi')
require 'rfpdf'
lib/plugins/rfpdf/lib/tcpdf.rb (working copy)
cattr_accessor :k_path_url_cache
@@k_path_url_cache = Rails.root.join('tmp')
cattr_accessor :decoder
attr_accessor :barcode
attr_accessor :buffer
......
#Some checks
dochecks();
begin
@@decoder = HTMLEntities.new
rescue
@@decoder = nil
end
#Initialization of properties
@barcode ||= false
@buffer ||= ''
......
# @return string converted
#
def unhtmlentities(string)
if @@decoder.nil?
CGI.unescapeHTML(string)
else
@@decoder.decode(string)
end
end
end # END OF CLASS
lib/plugins/rfpdf/README (working copy)
==
==
If you are using HTML, it is recommended you install:
gem install -r htmlentities
TCPDF Documentation located at:
http://phpdocs.moodle.org/com-tecnick-tcpdf/TCPDF.html
......
pdf = TCPDF.new
ENJOY!
ENJOY!
(2-2/2)