Fixing bad database encoding practice.
Used the wrong strencode and fixed the configuration option always being forced to null.(Thus this extension would never work.)
Merge pull request #1 from Alexia/master

Security Fixes and Functionality Fix