working embedding of pdfs; automatic escaping of closing script tags