1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rexml/attribute.rb (REXML::Attribute#to_string): Fix wrong

entry reference name of double quote.
  [Bug#12609][ruby-core:76509]
  Patch by Joseph Marrero. Thanks!!!


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kou 2016-07-22 01:39:49 +00:00
parent 0ad3557d81
commit 95c78413f9
2 changed files with 8 additions and 1 deletions

View file

@ -110,7 +110,7 @@ module REXML
# b.to_string # -> "ns:x='y'"
def to_string
if @element and @element.context and @element.context[:attribute_quote] == :quote
%Q^#@expanded_name="#{to_s().gsub(/"/, '&quote;')}"^
%Q^#@expanded_name="#{to_s().gsub(/"/, '"')}"^
else
"#@expanded_name='#{to_s().gsub(/'/, ''')}'"
end