Trying to view documentation with an invalid path would cause an error when it
encoded the path in the 404 error page, so rather than fix that case, just use
a safer function everywhere. Although maybe should be a bit more cautious about
displaying user supplied text?