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?
- Use `http_response_code` as it's a bit more robust than using `header`.
- Check errors against `error_reporting()`, so that error checks can be
ignored when appropriate.
It used to just grab anything that looked like a version number from a
string. Now the whole string must be a version number. Left the library
list in a little bit of a mess, but will clean that up next.
So that a release can have a version number before it goes into beta.
Note: needed to run update-doc-list for this to work, as the serialised
documentation list includes version numbers.
This allowed me to simplify some of update-doc-list as there's no longer
any need to work out the module for a library. This might break
update-doc-list in places. Will work on that next.