Adds slashes before inserting any HTML to prevent JS injections.

Added some code to prevent javascript injections by adding slashes on risky HTML strings.