mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
webhooks/freshdesk/doc.md: Remove unescape_rendered_html kludge.
This reverts commit f476ec7fac (#10312)
and replaces it with a proper fix using Jinja2 raw blocks.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
committed by
Tim Abbott
parent
9f08513acb
commit
5e97e58df3
@@ -194,14 +194,6 @@ def integration_doc(request: HttpRequest, integration_name: str=REQ(default=None
|
||||
context['hubot_docs_url'] = integration.hubot_docs_url
|
||||
if isinstance(integration, EmailIntegration):
|
||||
context['email_gateway_example'] = settings.EMAIL_GATEWAY_EXAMPLE
|
||||
if integration.name == 'freshdesk':
|
||||
# In our Freshdesk docs, some nested code blocks have characters such
|
||||
# as '{' encoded as '{' to prevent clashes with Jinja2 syntax,
|
||||
# but the encoded form never gets rendered because the text ends up
|
||||
# inside a <pre> tag. So here, we explicitly set a directive that
|
||||
# a particular template should be "unescaped" before being displayed.
|
||||
# Note that this value is used by render_markdown_path.
|
||||
context['unescape_rendered_html'] = True
|
||||
|
||||
doc_html_str = render_markdown_path(integration.doc, context)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user