I am developing a site which fetches content from a document repository service.
So for this project Drupal is being used to display content but does not itself manage the content.

Most of the documents are downloaded as files
However text, html and xml file display in the browser.

How do I go about making sure these formats are safe before displaying them.

would one of the functions in the link bellow do the trick
https://api.drupal.org/api/drupal/includes!common.inc/group/sanitization/7

Comments

Jaypan’s picture

Yes.

Generally, you can use check_plain().