Fix XSS vulnerability

Application title, element title and layerset title were subject to a
XSS vulnerability during delete dialog preparation.