Closed scelis closed 14 years ago
Hey scellis!
Thanks for taking the time to narrow down the issue.
There's also the 'slimmer.middleware.CompressHtmlMiddleware' middleware and that maybe playing a role in your situation.
Mingus won't be updated to support patching BSoup or further forking django-basic-apps to support the change request.
I know a handful of technical blogs, including my own, that are functioning just fine with the current configuration.
So, that being said, I would suggest updating your installation to resolve your issue.
Thanks for using Mingus!
Hi montylounge,
I just wanted to let you know that I had already disabled 'slimmer.middleware.CompressHtmlMiddleware'. I am experiencing this with the latest version of mingus. I came across this while updating my install and it definitely happens with a clean, up-to-date install of mingus. It's an issue in the latest version of the _renderinlines filter.
Thanks,
Sebastian
Thx!
My blog is a technical blog and I often post code snippets. Sadly, django-mingus currently strips all extraneous whitespace from blog posts. I have investigated this issue and have narrowed it down to the _renderinlines filter in django-basic-apps.
In src/django-basic-apps/basic/inlines/parser.py, the inlines function makes use of the BeautifulStoneSoup class. This class sets PRESERVE_WHITESPACE_TAGS to an empty list while the BeautifulSoup class sets it to contain both the pre and textarea tags.
Sure enough, if I edit the BeautifulSoup code to set pre as a PRESERVE_WHITESPACE_TAG for BeautifulStoneSoup, everything works perfectly and my whitespace is no longer stripped.
So it appears to me that there are a few possible solutions:
What are your thoughts on this whole situation? I can very easily do (1) for my personal mingus install, but it would be nice to fix this for all mingus users.