lib/gettext/po_entry.rb in gettext-3.4.4 vs lib/gettext/po_entry.rb in gettext-3.4.5
- old
+ new
@@ -239,14 +239,16 @@
class Formatter
class << self
def escape(string)
return "" if string.nil?
- string.gsub(/([\\"\t\n])/) do
+ string.gsub(/([\\"\t\r\n])/) do
special_character = $1
case special_character
when "\t"
"\\t"
+ when "\r"
+ "\\r"
when "\n"
"\\n"
else
"\\#{special_character}"
end