Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Footnotes don’t have id tags when published from iA Writer #20600

Open
1 task done
jasonanthonyguy opened this issue Jul 12, 2024 · 0 comments
Open
1 task done

Footnotes don’t have id tags when published from iA Writer #20600

jasonanthonyguy opened this issue Jul 12, 2024 · 0 comments
Labels
bug [triage] something behaving unexpectedly

Comments

@jasonanthonyguy
Copy link

Issue Summary

When publishing from iA Writer to Ghost using iA Writer’s Default option, any footnotes lose their id tags, causing them to fail.

I contacted the iA team about this, as I presumed it was a bug on their end. They said:

The Default and the HTML block options in iA Writer send the same exact HTML to Ghost. When you use the default option, Ghost converts the HTML into its own internal block representation. Looks like Ghost removes the id attributes in the process.

The following markdown code in iA Writer:

Main text with a footnote[^1].

[^1]: The footnote text.

generates the following HTML sent to Ghost:

<p>Main text with a footnote<sup><a href="#fn1-1547" id="fnr1-1547" title="see footnote" class="footnote">1</a></sup>.</p>

<div class="footnotes">
<hr>
<ol>
  <li id="fn1-1547">
    <p>The footnote text. <a href="#fnr1-1547" title="return to article" class="reversefootnote">↩︎</a></p>
  </li>
</ol>
</div>

but when processed by Ghost, results in the following final HTML:

<p> Main text with a footnote<a href="#fn1-1547"><sup>1</sup></a>.</p>

<hr>
  <ol>
    <li> The footnote text. <a href="#fnr1-1547">↩︎</a></li>
  </ol>

There are many issues here, but the most relevant is the stripping of the id tags.

Steps to Reproduce

  1. Download, install, and configure iA Writer, connected to Ghost. Confirm the Default option is selected when configuring.
  2. In iA Writer, create a post containing a markdown footnotes. See above to example content.
  3. From iA Writer, Publish to Ghost. A window containing a draft of the content opens.
  4. Publish or Preview the content and view the HTML source. It will have changed significantly and is missing id tags on footnotes.
  5. If, interested, change iA Writer to output HTML and compare the result.

Ghost Version

5.86.2

Node.js Version

18.17.1

How did you install Ghost?

Locally hosted via DigitalOcean upon Ubuntu 22.04

Database type

MySQL 5.7

Browser & OS version

No response

Relevant log / error output

No response

Code of Conduct

  • I agree to be friendly and polite to people in this repository
@github-actions github-actions bot added the needs:triage [triage] this needs to be triaged by the Ghost team label Jul 12, 2024
@linear linear bot added P3 - Medium [triage] Bugs which we'll fix soon and removed needs:triage [triage] this needs to be triaged by the Ghost team labels Jul 12, 2024
@ErisDS ErisDS added bug [triage] something behaving unexpectedly and removed P3 - Medium [triage] Bugs which we'll fix soon labels Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [triage] something behaving unexpectedly
Projects
None yet
Development

No branches or pull requests

2 participants