Adding a check for html div elements appearing in the content