fixed bugs in replaceSpecialChars()
added tests for replaceSpecialChars()