Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Commit

Permalink
AccessLogger: Escape string before double-quoting
Browse files Browse the repository at this point in the history
Before:

    "Say "Hi""

After:

    "Say \"Hi\""
  • Loading branch information
Yi EungJun committed Oct 30, 2014
1 parent b8c0bf9 commit 398f369
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/utils/AccessLogger.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
package utils;

import controllers.UserApp;
import org.apache.commons.lang3.StringEscapeUtils;
import play.api.mvc.AsyncResult;
import play.api.mvc.PlainResult;
import play.libs.Akka;
Expand Down Expand Up @@ -59,7 +60,7 @@ static private String quotedOrHyphen(String value) {
if (value == null) {
return "-";
} else {
return "\"" + value + "\"";
return "\"" + StringEscapeUtils.escapeJava(value) + "\"";
}
}

Expand Down

0 comments on commit 398f369

Please sign in to comment.