[gen_l10n] Escape quote characters in ARB files (#51952)
This commit is contained in:
committed by
GitHub
parent
cccbf1f200
commit
9c5009b251
@@ -163,6 +163,11 @@ String generateMethod(Message message, AppResourceBundle bundle) {
|
||||
messageValue = messageValue.replaceAll('{${placeholder.name}}', '\${${placeholder.name}}');
|
||||
}
|
||||
}
|
||||
|
||||
// Escape single and double quotes.
|
||||
messageValue = messageValue.replaceAll("'", '\\\'');
|
||||
messageValue = messageValue.replaceAll('"', '\\\"');
|
||||
|
||||
return "'$messageValue'";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user