This might be a really silly question but where is the best place to put the HTML purifier library?
I am assuming if I put it in public_html then someone with ill intent could easily access it, should I put it in a folder that is on the same par level as public_html? maybe make a special folder for it? Or should I be placing it completely outside the document root?
There are several ways to do this. You already named a few. The first way is to just place it outside the web root so no-one can acces it. The second one (the one I always use) is to create a new folder for the file and place a .htaccess in it with the following content:
This allows you to include the file with php but not to call it directly from your browser.
If you want to know more about the second method, take a look at this link.