Fixes 2 issues

* fseek no longer throws an error when a resource is used that doesn't support fseek
* sttributes are now html encoded to ensure that they are valid when using &amp; ect.