change purify_html

search from beginning of the content, not from the end