1 2 3 4 5 6 7 8 9
use core::*; use util::*; pub fn nl2br(value: &str) -> Fragment { let text = escape_text(value); let fixed = text.replace("\r\n", "\n").replace("\n", "<br/>"); raw(&fixed) }
1 2 3 4 5 6 7 8 9
use core::*; use util::*; pub fn nl2br(value: &str) -> Fragment { let text = escape_text(value); let fixed = text.replace("\r\n", "\n").replace("\n", "<br/>"); raw(&fixed) }