Skip to content

Commit

Permalink
using different method, this seems to work
Browse files Browse the repository at this point in the history
  • Loading branch information
tcnichol committed Apr 28, 2024
1 parent 52a5c73 commit 82383b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/api/Users.scala
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ class Users @Inject()(users: UserService, events: EventService) extends ApiContr
implicit val user = request.user
// val escapedFirstName = htmlEscape(firstName)
// val escapedLastName = htmlEscape(lastName)
val escapedFirstName = org.apache.commons.lang.StringEscapeUtils.escapeJavaScript(firstName)
val escapedLastName = org.apache.commons.lang.StringEscapeUtils.escapeJavaScript(lastName)
val escapedFirstName = scala.xml.Text(firstName).toString
val escapedLastName = scala.xml.Text(lastName).toString
users.updateUserField(id, "firstName", escapedFirstName)
users.updateUserField(id, "lastName", escapedLastName)
users.updateUserField(id, "fullName", escapedFirstName + " " + escapedLastName)
Expand Down

0 comments on commit 82383b4

Please sign in to comment.