added: new ezc filter: fil_new_line_to_br
added: PutChar() methods to HtmlTextFilter and TexTextFilter git-svn-id: svn://ttmath.org/publicrep/winix/trunk@885 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2011, Tomasz Sowa
|
||||
* Copyright (c) 2008-2012, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -136,4 +136,21 @@ void fil_csv_escape(Info & i)
|
||||
|
||||
|
||||
|
||||
void fil_new_line_to_br(Info & i)
|
||||
{
|
||||
const std::wstring & str = i.in.Str();
|
||||
|
||||
for(size_t a=0 ; a<str.size() ; ++a)
|
||||
{
|
||||
if( str[a] == '\n' )
|
||||
i.out << R("<br>\n");
|
||||
else
|
||||
i.out << R(str[a]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user