simonw / til

Today I Learned
https://til.simonwillison.net
Apache License 2.0
1.08k stars 86 forks source link

<br> and table elements being escaped in the feed #12

Closed simonw closed 4 years ago

simonw commented 4 years ago

https://twitter.com/sil/status/1258108977310810114

more TIL feed whining, I'm afraid. It seems to be double-escaping
elements in the output of a markdown table in the latest post about listing all columns...

simonw commented 4 years ago
Screenshot_5_6_20__12_31_PM
simonw commented 4 years ago

I can fix this now that I'm rendering the Markdown using the GitHub API (in #17) and caching that rendered HTML in the database.

simonw commented 4 years ago

That's not enough though: datasette-atom has default bleach rules that prevent it from displaying things like HTML tables:

https://github.com/simonw/datasette-atom/blob/a3e64f5fce2f64a0d54999aadde39c1aa805d796/datasette_atom/__init__.py#L52-L53

        if "atom_content_html" in columns:
            entry.content(clean(row["atom_content_html"]), type="html")
simonw commented 4 years ago

Blocked on https://github.com/simonw/datasette-atom/issues/13

simonw commented 4 years ago

That fixed it:

Screenshot_8_23_20__10_02_AM