summaryrefslogtreecommitdiffstats
path: root/lib/plugins
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2013-02-15 13:24:10 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2013-02-15 13:24:10 +0000
commitd5f1e186f1e800e0fff41b937fc87fbf49d7d25c (patch)
treea20988fc16bd60237e7cd63824f0625b20bd2034 /lib/plugins
parentb5c2ca56666e79ea642df8c6e790cc60de44ccfa (diff)
downloadredmine-d5f1e186f1e800e0fff41b937fc87fbf49d7d25c.tar.gz
redmine-d5f1e186f1e800e0fff41b937fc87fbf49d7d25c.zip
not use htmlentities gem in rfpdf plugin (#13138)
Contributed by Jun NAITOH. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11399 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/plugins')
-rw-r--r--lib/plugins/rfpdf/README6
-rw-r--r--lib/plugins/rfpdf/init.rb5
-rwxr-xr-xlib/plugins/rfpdf/lib/tcpdf.rb12
3 files changed, 1 insertions, 22 deletions
diff --git a/lib/plugins/rfpdf/README b/lib/plugins/rfpdf/README
index 8ecfe164e..d5a8332e5 100644
--- a/lib/plugins/rfpdf/README
+++ b/lib/plugins/rfpdf/README
@@ -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!
diff --git a/lib/plugins/rfpdf/init.rb b/lib/plugins/rfpdf/init.rb
index efe4ebd78..9be784350 100644
--- a/lib/plugins/rfpdf/init.rb
+++ b/lib/plugins/rfpdf/init.rb
@@ -1,8 +1,3 @@
-begin
- require('htmlentities')
-rescue LoadError
- # This gem is not required - just nice to have.
-end
require('cgi')
require 'rfpdf'
diff --git a/lib/plugins/rfpdf/lib/tcpdf.rb b/lib/plugins/rfpdf/lib/tcpdf.rb
index 5ffc1f850..fac984cd0 100755
--- a/lib/plugins/rfpdf/lib/tcpdf.rb
+++ b/lib/plugins/rfpdf/lib/tcpdf.rb
@@ -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