diff --git a/functions/rm.cpp b/functions/rm.cpp index af1e2e6..7cbb944 100644 --- a/functions/rm.cpp +++ b/functions/rm.cpp @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2008-2014, Tomasz Sowa + * Copyright (c) 2008-2015, Tomasz Sowa * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -493,18 +493,20 @@ void Rm::Clear() void Rm::CreateJSON(bool status) { - auto & out = cur->request->out_streams[0]; +using TemplatesFunctions::R; +PT::WTextStream buf; - out << "{\"files\": [{\""; - JSONescape(out, cur->request->item.url); - out << "\": "; + JSONescape(buf, cur->request->item.url); + + auto & out = cur->request->out_streams[0]; + out << R("{\"files\": [{\"") << R(buf) << R("\": "); if( status ) - out << "true"; + out << R("true"); else - out << "false"; + out << R("false"); - out << "}]}"; + out << R("}]}"); cur->request->page_generated = true; cur->request->use_html_filter[0] = false;