The pre tag is a security measure to avoid malicious / unintended html constructs and possible php escapes.
Somewhere the nowrap has been set and needs to be removed out of the css classes "reminder_overdue, reminder_due, reminder" that is in $extra or some inheritance.
Hope you have installed the dashboard theme and edited the default.css there by removing the erroneous last "*/" as per this commit.
There are several instances of white-space: nowrap; in the dashboard theme's default css file (as in all other themes) that may have got inherited suffers defaults.
The better option if you cannot control user input, it is to establish the css property, overflow:hidden, so if the string is superior to the width, it will not deform the design.
The following should work everywhere:
<div style="word-wrap: break-word; width: 100px"> gdfggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg</div>