Preserve HTML tags with no tag algorithm