if ( i == end )
return out;
break;
+
+ // We need to translate any line break into exactly one <br>.
+ // Quoting HTML spec: "A line break is defined to be a carriage
+ // return (
), a line feed (
), or a carriage
+ // return/line feed pair."
+ case '\r':
+ {
+ wxString::const_iterator j(i + 1);
+ if ( j != end && *j == '\n' )
+ i = j;
+ }
+ // fall through
case '\n':
out << "<br>";
break;
+
default:
out << *i;
break;