Skip to content

Commit

Permalink
LPS-123823 Escape category toast message
Browse files Browse the repository at this point in the history
  • Loading branch information
victorg1991 authored and brianchandotcom committed Nov 23, 2020
1 parent 9a9403c commit d2dd792
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import com.liferay.portal.kernel.servlet.MultiSessionMessages;
import com.liferay.portal.kernel.servlet.SessionErrors;
import com.liferay.portal.kernel.theme.ThemeDisplay;
import com.liferay.portal.kernel.util.HtmlUtil;
import com.liferay.portal.kernel.util.LocalizationUtil;
import com.liferay.portal.kernel.util.ParamUtil;
import com.liferay.portal.kernel.util.Portal;
Expand Down Expand Up @@ -188,7 +189,9 @@ public void editCategory(
LanguageUtil.format(
_portal.getHttpServletRequest(actionRequest),
"x-was-created-successfully",
new Object[] {titleMap.get(themeDisplay.getLocale())}));
new Object[] {
HtmlUtil.escape(titleMap.get(themeDisplay.getLocale()))
}));
}
else {

Expand All @@ -210,7 +213,9 @@ public void editCategory(
LanguageUtil.format(
_portal.getHttpServletRequest(actionRequest),
"x-was-updated-successfully",
new Object[] {titleMap.get(themeDisplay.getLocale())}));
new Object[] {
HtmlUtil.escape(titleMap.get(themeDisplay.getLocale()))
}));
}

sendRedirect(actionRequest, actionResponse);
Expand Down

0 comments on commit d2dd792

Please sign in to comment.