The "html::nl2br" procedure is designed to replace all line-endings with the HTML <br> construct. It appears to be missing a common line-ending combo. Here's the original procedure:
proc ::html::nl2br {s} {
return [string map [list \n\r <br> \n <br> \r <br>] $s]
}
It's missing a substitution of the common "\r\n" combo. Ultimately, the current procedure replaces that combo with 2 <br>'s, which is incorrect. Now, maybe the existing "\n\r" is just transposed by accident, as that seems odd anyway...
I'd suggest the following replacement if that's the case:
proc ::html::nl2br {s} {
return [string map [list \r\n <br> \n <br> \r <br>] $s]
}
Jeff