Skip to content
Snippets Groups Projects
Commit 4faa39bb authored by srosse's avatar srosse
Browse files

OO-239: escaped the title of Ext popup windows

parent 83a2e95d
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
*/ */
package org.olat.core.gui.control.generic.closablewrapper; package org.olat.core.gui.control.generic.closablewrapper;
import org.apache.commons.lang.StringEscapeUtils;
import org.olat.core.gui.UserRequest; import org.olat.core.gui.UserRequest;
import org.olat.core.gui.components.Component; import org.olat.core.gui.components.Component;
import org.olat.core.gui.components.link.Link; import org.olat.core.gui.components.link.Link;
...@@ -54,7 +55,10 @@ public class CloseableModalWindowController extends BasicController { ...@@ -54,7 +55,10 @@ public class CloseableModalWindowController extends BasicController {
public CloseableModalWindowController(UserRequest ureq, WindowControl wControl, String title, Component modalContent, String id) { public CloseableModalWindowController(UserRequest ureq, WindowControl wControl, String title, Component modalContent, String id) {
super(ureq, wControl); super(ureq, wControl);
mainVC = createVelocityContainer("modalwindow"); mainVC = createVelocityContainer("modalwindow");
if (title != null) mainVC.contextPut("title", title); if (title != null) {
String escapedTitle = StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(title));
mainVC.contextPut("title", escapedTitle);
}
mainVC.put("content", modalContent); mainVC.put("content", modalContent);
setCloseable(true); setCloseable(true);
setIgnoreCookie(false); setIgnoreCookie(false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment