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:
parent
2c6edb9f3c
commit
967e6413e5
|
@ -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]*)=["\']?([^"\']*)["\']?/)
|
||||
|
|
Loading…
Reference in New Issue