##// END OF EJS Templates
Merged r11399 from trunk to 2.2-stable (#13138)...
Toshi MARUYAMA -
r11170:252df8dfc0a4
parent child
Show More
@@ -10,10 +10,6 A template plugin allowing the inclusion of ERB-enabled RFPDF template files.
10 10 ==
11 11 ==
12 12
13 If you are using HTML, it is recommended you install:
14
15 gem install -r htmlentities
16
17 13 TCPDF Documentation located at:
18 14
19 15 http://phpdocs.moodle.org/com-tecnick-tcpdf/TCPDF.html
@@ -42,4 +38,4 to:
42 38
43 39 pdf = TCPDF.new
44 40
45 ENJOY! No newline at end of file
41 ENJOY!
@@ -1,8 +1,3
1 begin
2 require('htmlentities')
3 rescue LoadError
4 # This gem is not required - just nice to have.
5 end
6 1 require('cgi')
7 2 require 'rfpdf'
8 3
@@ -94,8 +94,6 class TCPDF
94 94 cattr_accessor :k_path_url_cache
95 95 @@k_path_url_cache = Rails.root.join('tmp')
96 96
97 cattr_accessor :decoder
98
99 97 attr_accessor :barcode
100 98
101 99 attr_accessor :buffer
@@ -223,12 +221,6 class TCPDF
223 221 #Some checks
224 222 dochecks();
225 223
226 begin
227 @@decoder = HTMLEntities.new
228 rescue
229 @@decoder = nil
230 end
231
232 224 #Initialization of properties
233 225 @barcode ||= false
234 226 @buffer ||= ''
@@ -4344,11 +4336,7 class TCPDF
4344 4336 # @return string converted
4345 4337 #
4346 4338 def unhtmlentities(string)
4347 if @@decoder.nil?
4348 4339 CGI.unescapeHTML(string)
4349 else
4350 @@decoder.decode(string)
4351 end
4352 4340 end
4353 4341
4354 4342 end # END OF CLASS
General Comments 0
You need to be logged in to leave comments. Login now