diff options
Diffstat (limited to 'actionpack/lib/action_controller/vendor/html-scanner/html/node.rb')
-rw-r--r-- | actionpack/lib/action_controller/vendor/html-scanner/html/node.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb b/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb index e6362655e8..edfc57d8b6 100644 --- a/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb +++ b/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb @@ -277,7 +277,10 @@ module HTML#:nodoc: "</#{@name}>" else s = "<#{@name}" - @attributes.each { |k,v| s << " #{k}='#{v.to_s.gsub(/'/,"\\\\'")}'" } + @attributes.each do |k,v| + s << " #{k}" + s << "='#{v.gsub(/'/,"\\\\'")}'" if String === v + end s << " /" if @closing == :self s << ">" @children.each { |child| s << child.to_s } |