Added special character handling, and fixed how breaks are handled after certain elements.