some methods from templates/item.cpp moved to ItemContent

This commit is contained in:
2021-06-20 21:22:08 +02:00
parent 801fc062ef
commit ade96bf6d3
10 changed files with 261 additions and 118 deletions

View File

@@ -161,6 +161,25 @@ void print_user_name(Info & i, User * puser, const std::wstring & guest_name)
}
bool should_escape(Info & env)
{
bool res = true;
for(size_t i=0 ; i < env.params.size() ; ++i)
{
// CHECKME what about env.params[i].is_function ?
if( env.params[i].str == L"noescape" || env.params[i].str == L"raw" )
{
res = false;
break;
}
}
return res;
}