lib/pump/xml/value.rb in pump-0.6.4 vs lib/pump/xml/value.rb in pump-0.6.5

- old
+ new

@@ -8,20 +8,24 @@ def plain "object.#{name}" end def to_s(plain_path=nil) - "\#{#{plain_path || plain}#{cast}}" + "\#{#{remove_ilegal_chars}#{plain_path || plain}#{cast}}" end private def cast if options[:typecast] ".#{options[:typecast]}" elsif !options[:xmlsafe] '.to_s.encode(:xml => :text)' end + end + + def remove_ilegal_chars + "remove_ilegal_chars " if !options[:typecast] && !options[:xmlsafe] end end end end \ No newline at end of file