]> source.dussan.org Git - redmine.git/commitdiff
Merged r11399 from trunk to 2.2-stable (#13138)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 15 Feb 2013 14:32:45 +0000 (14:32 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 15 Feb 2013 14:32:45 +0000 (14:32 +0000)
not use htmlentities gem in rfpdf plugin.

Contributed by Jun NAITOH.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.2-stable@11400 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/plugins/rfpdf/README
lib/plugins/rfpdf/init.rb
lib/plugins/rfpdf/lib/tcpdf.rb

index 8ecfe164e5514e0cb591fe0d0f45b08623e0e7a0..d5a8332e54868e0179445f0fc1fed28c9228e3ac 100644 (file)
@@ -10,10 +10,6 @@ A template plugin allowing the inclusion of ERB-enabled RFPDF template files.
 ==
 ==
 
-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
@@ -42,4 +38,4 @@ to:
 
   pdf = TCPDF.new
 
-ENJOY!
\ No newline at end of file
+ENJOY!
index efe4ebd7844fe758d7ef1d6134923bd681b39b78..9be7843501c5e9cd7511c03184f21335e93264a6 100644 (file)
@@ -1,8 +1,3 @@
-begin
-  require('htmlentities') 
-rescue LoadError
-  # This gem is not required - just nice to have.
-end
 require('cgi')
 require 'rfpdf'
 
index 5ffc1f85009a7b82eeda9e5a843525f654afb51f..fac984cd02b4c286621fcecaf0ae257b30b2f915 100755 (executable)
@@ -94,8 +94,6 @@ class TCPDF
   cattr_accessor :k_path_url_cache
   @@k_path_url_cache = Rails.root.join('tmp')
   
-  cattr_accessor :decoder
-               
        attr_accessor :barcode
        
        attr_accessor :buffer
@@ -223,12 +221,6 @@ class TCPDF
                #Some checks
                dochecks();
                
-               begin     
-                 @@decoder = HTMLEntities.new 
-               rescue
-                 @@decoder = nil
-               end
-               
                #Initialization of properties
        @barcode ||= false
                @buffer ||= ''
@@ -4344,11 +4336,7 @@ class TCPDF
        # @return string converted
        #
        def unhtmlentities(string)
-         if @@decoder.nil?
       CGI.unescapeHTML(string)
-    else
-         @@decoder.decode(string)
-    end
   end
   
 end # END OF CLASS