Fixes for Issue 12

This is for #12.
 
Changes:
* support more html5 containers
* support php documents
* for IP, strip trailing whitespace