Add Carriage Return in WHOIS disclaimer text

WHOIS disclaimer is read from the config yaml file directly and the line breaks
within the text does not contain carriage return, which ICANN requires. This
CL fixes the non-compliance.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156359526
This commit is contained in:
jianglai 2017-05-17 15:05:58 -07:00 committed by Ben McIlwain
parent 16f2799ad9
commit 3f5735ed4b
21 changed files with 60 additions and 9 deletions

View file

@ -157,7 +157,7 @@ abstract class WhoisResponseImpl implements WhoisResponse {
/** Returns raw text that should be appended to the end of ALL WHOIS responses. */
E emitFooter(String disclaimer) {
stringBuilder.append(disclaimer).append("\r\n");
stringBuilder.append(disclaimer.replaceAll("\r?\n", "\r\n").trim()).append("\r\n");
return thisCastToDerived();
}