Don't Display Footnote Number on Excerpt #125

Closed
manishsuwal opened this Issue Aug 2, 2014 · 3 comments

Projects

None yet

2 participants

@manishsuwal
Contributor

The number ‘1’ after the end of sentence is a footnote, which probably shouldn’t be displayed in the excerpt:

From Twitter:

The number ‘1’ after the end of sentence is a footnote, which probably shouldn’t be displayed in the excerpt @raamdev pic.twitter.com/J8L17SUTW6

— Manish Suwal 'Enwil' (@manishsuwal) July 28, 2014
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
@raamdev raamdev added the bug label Aug 2, 2014
@raamdev raamdev added this to the Next Release milestone Aug 2, 2014
@raamdev
Owner
raamdev commented Aug 2, 2014

Thanks! I'll add this to the Next Release milestone.

@raamdev
Owner
raamdev commented Aug 21, 2014

Hmm, taking another look at this now. This is going to be a bit tricky.

Currently, I search for and strip out any <div> with a class="footnotes", but the problem here is the <sup> tag that adds the 1, which links to the footnotes.

I'm wondering if I should even be worrying about this in the core theme. This seems like something a site owner should specify on their own in a child theme, using CSS, since each site owner may implement footnotes differently.

For example, there are WordPress plugins for adding footnotes to your posts and I have no way of detecting how those are implemented and therefore would not be able to automatically remove them.

@raamdev raamdev removed this from the Next Release milestone Aug 21, 2014
@raamdev
Owner
raamdev commented Aug 22, 2014

OK, problem solved. For Quote and Aside post formats, the theme now strips out any anchor tags and any footnotes (<sup></sup>) from the content before linking the content to the permalink (on blog, archive, and search pages).

It's just not possible to show an anchor tag inside the Quote or Aside content on the Blog, Archive, or Search pages, because on those pages the Quote and Aside content is linked to the permalink for the Quote or Aside, and nesting anchors inside anchors doesn't work (e.g., <a href="permalink"><div class="entry-content">Some content with <a href="#">a link</a></div></a>).

@raamdev raamdev added this to the Next Release milestone Aug 22, 2014
@raamdev raamdev closed this in 98cad7a Aug 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment