/* This file is part of Metaproxy.
- Copyright (C) 2005-2011 Index Data
+ Copyright (C) 2005-2012 Index Data
Metaproxy is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
char *x = (char *) xmalloc(1 + s.length() * 3);
yaz_encode_uri_component(x, s.c_str());
std::string result(x);
+ xfree(x);
+ return result;
+}
+
+
+std::string mp_util::uri_decode(std::string s)
+{
+ char *x = (char *) xmalloc(1 + s.length());
+ yaz_decode_uri_component(x, s.c_str(), s.length());
+ std::string result(x);
+ xfree(x);
return result;
}