Added more advanced special char handling.

Added helper method to replace the following special chars to their corresponding special code:
&, <, >, "