Convert \n to <br/> in xhtml body

fix #2539
This commit is contained in:
Emmanuel Gil Peyrot
2014-06-08 05:35:36 +02:00
committed by Florent Le Coz
parent 2d5e2fdcf6
commit 3d9183557f
3 changed files with 13 additions and 0 deletions
+7
View File
@@ -77,6 +77,13 @@ Xmpp::body irc_format_to_xhtmlim(const std::string& s)
if (s[pos_end] == IRC_FORMAT_BOLD_CHAR)
styles.strong = !styles.strong;
else if (s[pos_end] == IRC_FORMAT_NEWLINE_CHAR)
{
XmlNode* br_node = new XmlNode("br");
br_node->close();
current_node->add_child(br_node);
cleaned += '\n';
}
else if (s[pos_end] == IRC_FORMAT_UNDERLINE_CHAR)
styles.underline = !styles.underline;
else if (s[pos_end] == IRC_FORMAT_ITALIC_CHAR)