fix bug in links with intermixed html