aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-12-25 08:37:54 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-12-28 14:42:17 +0300
commitbfec6fffb4acd9673ecf066a0e4f1b4baf2dd831 (patch)
treeca85d9db6ddeeaf1b89c488b9ed629511003566a /mod
parent21d9f67600a53af44d0f7365074de5312a829193 (diff)
Make use of butl url encode() and decode() functions
Diffstat (limited to 'mod')
-rw-r--r--mod/build-config.cxx4
-rw-r--r--mod/mod-package-details.cxx2
-rw-r--r--mod/mod-package-version-details.cxx6
-rw-r--r--mod/mod-repository-details.cxx4
-rw-r--r--mod/page.cxx8
5 files changed, 14 insertions, 10 deletions
diff --git a/mod/build-config.cxx b/mod/build-config.cxx
index aa25511..cbde252 100644
--- a/mod/build-config.cxx
+++ b/mod/build-config.cxx
@@ -118,9 +118,9 @@ namespace brep
// the package version into the URL path part and so don't encode it.
//
string url (host + root.representation () +
- mime_url_encode (b.package_name) + '/' +
+ mime_url_encode (b.package_name, false) + '/' +
b.package_version.string () + "/log/" +
- mime_url_encode (b.configuration) + '/' +
+ mime_url_encode (b.configuration, false) + '/' +
b.toolchain_version.string ());
if (op != nullptr)
diff --git a/mod/mod-package-details.cxx b/mod/mod-package-details.cxx
index dce7f3b..ca2b94a 100644
--- a/mod/mod-package-details.cxx
+++ b/mod/mod-package-details.cxx
@@ -75,7 +75,7 @@ handle (request& rq, response& rs)
const dir_path& root (options_->root ());
const string& name (*rq.path ().rbegin ());
- const string ename (mime_url_encode (name));
+ const string ename (mime_url_encode (name, false));
params::package_details params;
bool full;
diff --git a/mod/mod-package-version-details.cxx b/mod/mod-package-version-details.cxx
index 134fb9a..26838f7 100644
--- a/mod/mod-package-version-details.cxx
+++ b/mod/mod-package-version-details.cxx
@@ -130,7 +130,9 @@ handle (request& rq, response& rs)
s << DIV(ID="heading")
<< H1
- << A(HREF=root / path (mime_url_encode (name))) << name << ~A
+ << A(HREF=root / path (mime_url_encode (name, false)))
+ << name
+ << ~A
<< "/"
<< A(HREF=url ()) << sver << ~A
<< ~H1
@@ -255,7 +257,7 @@ handle (request& rq, response& rs)
const auto& dcon (d.constraint);
const string& dname (p->id.name);
- string ename (mime_url_encode (dname));
+ string ename (mime_url_encode (dname, false));
if (r->url)
{
diff --git a/mod/mod-repository-details.cxx b/mod/mod-repository-details.cxx
index 177f49d..53cd3aa 100644
--- a/mod/mod-repository-details.cxx
+++ b/mod/mod-repository-details.cxx
@@ -99,7 +99,9 @@ handle (request& rq, response& rs)
//
string id (html_id (r.name));
s << H1(ID=id)
- << A(HREF="#" + web::mime_url_encode (id)) << r.display_name << ~A
+ << A(HREF="#" + web::mime_url_encode (id, false))
+ << r.display_name
+ << ~A
<< ~H1;
if (r.summary)
diff --git a/mod/page.cxx b/mod/page.cxx
index a7ec087..566406e 100644
--- a/mod/page.cxx
+++ b/mod/page.cxx
@@ -188,7 +188,7 @@ namespace brep
// Propagate search criteria to the package details page.
//
- << root_ / path (mime_url_encode (name_)) << query_param_
+ << root_ / path (mime_url_encode (name_, false)) << query_param_
<< ~HREF
<< name_
@@ -218,7 +218,7 @@ namespace brep
else
{
assert (root_ != nullptr);
- s << A(HREF=*root_ / dir_path (mime_url_encode (*package_)) /
+ s << A(HREF=*root_ / dir_path (mime_url_encode (*package_, false)) /
path (version_))
<< version_;
@@ -393,7 +393,7 @@ namespace brep
? p->internal_repository.load ()
: p->other_repositories[0].load ());
- auto en (mime_url_encode (n));
+ auto en (mime_url_encode (n, false));
if (r->url)
s << A(HREF=*r->url + en) << n << ~A;
@@ -542,7 +542,7 @@ namespace brep
<< SPAN(CLASS="value")
<< A
<< HREF
- << root_ << "?about#" << mime_url_encode (html_id (name_))
+ << root_ << "?about#" << mime_url_encode (html_id (name_), false)
<< ~HREF
<< name_
<< ~A