properly escape username validation error message flash

This commit is contained in:
Mike Greiling 2016-11-23 17:31:35 -06:00
parent 5c6d3a99ef
commit 5b9c4f4872
1 changed files with 2 additions and 1 deletions

View File

@ -2,5 +2,6 @@
:plain
new Flash("Username successfully changed", "notice")
- else
- error = @user.errors.full_messages.first
:plain
new Flash("Username change failed - #{@user.errors.full_messages.first}", "alert")
new Flash("Username change failed - #{escape_javascript error.html_safe}", "alert")