Bug fix: Not all special characters are being handled properly (issue #3) - moved encoding of the single and double quotes out of inner function getEncodedStr()