Attempting to fix cross-site scripting error