Add basic restricted_html structure
authorJuliana Rodrigueiro <juliana.rodrigueiro@intra2net.com>
Wed, 8 Aug 2018 12:13:39 +0000 (14:13 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Wed, 8 Aug 2018 13:28:48 +0000 (15:28 +0200)
src/CMakeLists.txt
src/restricted_html.cpp [new file with mode: 0644]
src/restricted_html.hpp [new file with mode: 0644]
test/CMakeLists.txt
test/test_restricted_html.cpp [new file with mode: 0644]

index e0eae1e..01a4e74 100644 (file)
@@ -17,6 +17,7 @@ SET(cpp_sources
    pidfile.cpp
    pipestream.cpp
    pointer_func.cpp
+   restricted_html.cpp
    source_track_basics.cpp
    stringfunc.cpp
    timefunc.cpp
@@ -45,6 +46,7 @@ SET(cpp_headers
     pidfile.hpp
     pipestream.hxx
     pointer_func.hpp
+    restricted_html.hpp
     source_track_basics.hpp
     stringfunc.hxx
     timefunc.hxx
diff --git a/src/restricted_html.cpp b/src/restricted_html.cpp
new file mode 100644 (file)
index 0000000..a157564
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
+/** @file
+ * @brief restricts html messages to an allowed group of tags.
+ *
+ * @copyright &copy; Copyright 2017 Intra2net AG
+ *
+ */
+
+#include <string>
+
+#include <stringfunc.hxx>
+#include <restricted_html.hpp>
+
+using namespace std;
+
+
+namespace I2n
+{
+
+
+
+} // eo namespace I2n
diff --git a/src/restricted_html.hpp b/src/restricted_html.hpp
new file mode 100644 (file)
index 0000000..43bf2e4
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
+/** @file
+ * @brief restricts html code to an allowed group of tags.
+ *
+ * @copyright &copy; Copyright 2017 Intra2net AG
+ *
+ */
+
+#ifndef __RESTRICTED_HTML_HPP
+#define __RESTRICTED_HTML_HPP
+
+#include <string>
+
+namespace I2n
+{
+
+
+} // eo namespace I2n
+
+#endif
index 3dfa47c..2928716 100644 (file)
@@ -16,6 +16,7 @@ SET(cpp_sources
    test_i18n.cpp
    test_logging.cpp
    test_pidfile.cpp
+   test_restricted_html.cpp
    test_timefunc.cpp
    test_tmpfstream.cpp
    test_tribool.cpp
diff --git a/test/test_restricted_html.cpp b/test/test_restricted_html.cpp
new file mode 100644 (file)
index 0000000..c3971ce
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
+/** @file
+ * @brief unit test for the restricted html functions.
+ *
+ * @copyright &copy; Copyright 2017 Intra2net AG
+ *
+ */
+#define BOOST_TEST_DYN_LINK
+#include <boost/test/unit_test.hpp>
+
+#include <restricted_html.hpp>
+
+using namespace std;
+using namespace I2n;
+
+BOOST_AUTO_TEST_SUITE(test_restricted_html)
+
+
+BOOST_AUTO_TEST_SUITE_END()