Lynnesbian / mstdn-ebooks

NO LONGER BEING UPDATED, NOT GUARANTEED TO WORK AT ALL
Mozilla Public License 2.0
34 stars 28 forks source link

extract_toot deletes the content of <p> blocks #49

Open compilin opened 3 years ago

compilin commented 3 years ago

Hello,

I've tried using this and generation wouldn't work, so I dug into the code and found out that all toots' content in the db were empty. Looking further, I've found the reason : https://github.com/Lynnesbian/mstdn-ebooks/commit/8274409bf4488db1f486bd0b753388ededfc2ed5 line 73

This commit changed the handling of p tags from "Append a line break and unwrap" to "replace with a linebreak". I'm assuming that's an unfortunate copy/paste with the above change about br tags, but either way the result is that all content inside p tags is sent into oblivion. I don't know if it's common or something about my instance but all of my toots' content are wrapped in a p tag, thus the database emptiness. Reverting that change made the code work again for me.