Add empty text check for first child of pre in innerHTML.(fixes #1743)

see #1743