You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jira Server 9.4.1 (self-hosted, wiki markup path — not Cloud/ADF)
Summary
On the Server/DC path, JiraPreprocessor.markdown_to_jira produces wiki markup that the
Atlassian wiki renderer mangles whenever the input contains curly braces. Two distinct cases:
1. Bare braces in plain text are passed through unescaped.
The wiki renderer treats any bare {...} as a macro attempt and splits the paragraph.
Input (Markdown): Filter {a: 1} and JSON {"key": "val"} in text
Converter output: unchanged (no escaping)
Rendered HTML (Jira 9.4.1, atlassian-wiki-renderer): <p>Filter </p> {a: 1} <p> and JSON </p> {"key": "val"} <p> in text</p> — paragraph broken.
Worse with macro-like names: Use {code} or {color:red} here injects an empty code panel
and swallows text.
2. Inline code containing braces is wrapped into invalid nested braces.
Input: Selector `{"id": "default"}`
Converter output: Selector {{{"id": "default"}}}
Rendered: <p>Selector {{</p> {"id": "default"} <p>}}</p> — the parser reads the inner {...} as a (broken) macro and explodes the fragment. This is the wiki-path counterpart
of #1340 (which covers the Cloud/ADF converter).
Expected behavior
Both render as literal text / monospace. Verified working forms on Jira Server 9.4.1:
for inline code spans, emit { / } for braces inside the {{...}} wrapper
instead of raw braces.
One design consideration: some users may intentionally pass raw Jira macros ({code}, {panel}) through Markdown input — escaping should whitelist balanced known macros or be
opt-out.
I can share full render-endpoint evidence (POST /rest/api/1.0/render) for all cases if useful.
Environment
Summary
On the Server/DC path,
JiraPreprocessor.markdown_to_jiraproduces wiki markup that theAtlassian wiki renderer mangles whenever the input contains curly braces. Two distinct cases:
1. Bare braces in plain text are passed through unescaped.
The wiki renderer treats any bare
{...}as a macro attempt and splits the paragraph.Input (Markdown):
Filter {a: 1} and JSON {"key": "val"} in textConverter output: unchanged (no escaping)
Rendered HTML (Jira 9.4.1,
atlassian-wiki-renderer):<p>Filter </p> {a: 1} <p> and JSON </p> {"key": "val"} <p> in text</p>— paragraph broken.Worse with macro-like names:
Use {code} or {color:red} hereinjects an empty code paneland swallows text.
2. Inline code containing braces is wrapped into invalid nested braces.
Input:
Selector `{"id": "default"}`Converter output:
Selector {{{"id": "default"}}}Rendered:
<p>Selector {{</p> {"id": "default"} <p>}}</p>— the parser reads the inner{...}as a (broken) macro and explodes the fragment. This is the wiki-path counterpartof #1340 (which covers the Cloud/ADF converter).
Expected behavior
Both render as literal text / monospace. Verified working forms on Jira Server 9.4.1:
Filter \{a: 1\}renders asFilter {a: 1}(clean<p>){{{"id": "default"}}}rendersas full
<tt>{"id": "default"}</tt>Suggested fix
In
markdown_to_jira(wiki path only; ADF path unaffected):{/}as\{/\}(analogous to the intraword-underscore escaping added in fix(jira): don't italicize intraword underscores in markdown_to_jira #1361),
{/}for braces inside the{{...}}wrapperinstead of raw braces.
One design consideration: some users may intentionally pass raw Jira macros (
{code},{panel}) through Markdown input — escaping should whitelist balanced known macros or beopt-out.
I can share full render-endpoint evidence (
POST /rest/api/1.0/render) for all cases if useful.