ENH: special case HTML repr behaviour on ipnb GH3573

#3573, and SO question mentioned in #3541