Fixed that tag[0] may be nil.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8731 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-01-30 17:57:51 +00:00
parent 2c6edb9f3c
commit 967e6413e5
1 changed files with 2 additions and 2 deletions

View File

@ -3474,7 +3474,7 @@ class TCPDF
#Extract attributes
# get tag name
tag = element.scan(/([a-zA-Z0-9]*)/).flatten.delete_if {|x| x.length == 0}
tag = tag[0].downcase;
tag = tag[0].to_s.downcase;
# get attributes
attr_array = element.scan(/([^=\s]*)=["\']?([^"\']*)["\']?/)
@ -3497,7 +3497,7 @@ class TCPDF
#Extract attributes
# get tag name
tag = element.scan(/([a-zA-Z0-9]*)/).flatten.delete_if {|x| x.length == 0}
tag = tag[0].downcase;
tag = tag[0].to_s.downcase;
# get attributes
attr_array = element.scan(/([^=\s]*)=["\']?([^"\']*)["\']?/)