piedoom / feather

A lightweight theme for zola
https://piedoom.github.io/feather/
32 stars 10 forks source link

Set HTML as "safe" #14

Closed codesections closed 6 years ago

codesections commented 6 years ago

This pull request suggests using the safe Tera filter to so that the HTML will display properly on the home page rather than having the home page display escaped HTML tags.

piedoom commented 6 years ago

Thanks! I appreciate the contrib.

piedoom commented 6 years ago

Oops! I forgot to mention that safe and striptags both need to be present for HTML stripping to occur. I didn't properly check and it actually will render then HTML (which is not what it should do for the sake of consistency)

image

I've documented my confusion here - https://github.com/Keats/gutenberg/issues/286 - but it seems like a wontfix

piedoom commented 6 years ago

Fixed it! Again, thanks for making the contrib. I've been meaning to fix this and your help pushed me to finally get off my ass and do it.

codesections commented 6 years ago

Thanks! I didn't realize that the intended behavior was for it to render plain text—I tend to want to render the HTML in my summaries. But I should have figured it out with striptags in there!

By the way, the reason I made these pull requests is that I'm trying to put together a live demo of the currently avalible Gutenberg themes. The site that demostrates Feather is at https://feather--gutenberg-theme-demo.netlify.com/ if you're interested.

On Sun, Jul 15, 2018, at 2:57 PM, doomy wrote:

Fixed it! Again, thanks for making the contrib. I've been meaning to fix this and your help pushed me to finally get off my ass and do it.

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/piedoom/feather/pull/14#issuecomment-405121424

piedoom commented 6 years ago

Oh that's an awesome idea! If you ever need any assistance I'd be happy to help.