fixed issue with special characters in excerpt function