Belle II Software development
HTML.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#include <framework/utilities/HTML.h>
9
10
11#include <gtest/gtest.h>
12
13using namespace std;
14using namespace Belle2;
15
16namespace {
17 TEST(Utilities, HTML)
18 {
19 std::string s("\"abc<def>geh &abc;&gt;");
20 EXPECT_EQ(s, HTML::unescape(HTML::escape(s)));
21
22 EXPECT_EQ("&quot;abc&lt;def&gt;geh &amp;abc;&amp;gt;", HTML::escape(s));
23 }
24}
std::string escape(const std::string &str)
Convert &, <, > etc.
Definition: HTML.cc:159
std::string unescape(const std::string &str)
inverse of escape()
Definition: HTML.cc:169
Abstract base class for different kinds of events.
STL namespace.