add tests for non-local url skipping and html in scripts/styles bugs; fix issues with prior implementation of said fixes