Added logic to remove script tags