Fix XSS (issue 9449)

http://tracker.modx.com/issues/9449