added protection from basic attacks (html) to both files.

no longer crashes if you enter html tags before actual directory