[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-merchant-demos] branch master updated: unquote article name
From: |
gnunet |
Subject: |
[taler-taler-merchant-demos] branch master updated: unquote article name for summary |
Date: |
Tue, 18 May 2021 22:14:37 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository taler-merchant-demos.
The following commit(s) were added to refs/heads/master by this push:
new a5bedb7 unquote article name for summary
a5bedb7 is described below
commit a5bedb7db9ceaa0342306f12f900914a8e9b4155
Author: Florian Dold <florian@dold.me>
AuthorDate: Tue May 18 22:14:31 2021 +0200
unquote article name for summary
---
talermerchantdemos/blog/blog.py | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/talermerchantdemos/blog/blog.py b/talermerchantdemos/blog/blog.py
index c84ab47..9722206 100644
--- a/talermerchantdemos/blog/blog.py
+++ b/talermerchantdemos/blog/blog.py
@@ -286,11 +286,13 @@ def render_article(article_name, lang, data, order_id,
refundable):
# @param lang which language to use
#
def post_order(article_name, lang):
+ name_decoded = urllib.parse.unquote(article_name).replace("_", " ")
+ summary = f"Essay: {name_decoded}"
order = dict(
amount=ARTICLE_AMOUNT,
extra=dict(article_name=article_name),
fulfillment_url=flask.request.base_url,
- summary="Essay: " + article_name.replace("_", " "),
+ summary=summary,
# FIXME: add support for i18n of summary!
# 10 minutes time for a refund
wire_transfer_deadline=dict(t_ms=1000 * int(time.time() + 15 * 30)),
@@ -397,12 +399,8 @@ def article(article_name, lang=None, data=None):
# Redirect the browser to a page where the wallet can
# run the payment protocol.
response = flask.redirect(pay_status["order_status_url"])
- response.set_cookie(
- "order_id", order_id, path=f"/essay/{article_name}"
- )
- response.set_cookie(
- "order_id", order_id, path=f"/{lang}/essay/{article_name}"
- )
+ response.set_cookie("order_id", order_id, path=f"/essay/{article_name}")
+ response.set_cookie("order_id", order_id,
path=f"/{lang}/essay/{article_name}")
return response
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-taler-merchant-demos] branch master updated: unquote article name for summary,
gnunet <=