TheBnl / silverstripe-cookie-consent

GDPR compliant cookie popup and consent checker
BSD 3-Clause "New" or "Revised" License
16 stars 7 forks source link

FIX: Ensure the module works with silverstripers/markdown module #6

Closed gordonbanderson closed 6 years ago

gordonbanderson commented 6 years ago

This one was a real headbanger. The form failed to render for me, escaping some of the form HTML and placing it inside <pre><code> tags. After experimenting with different HTML content in CookiePolicyPageController I eventually realised that 4 leading spaces was the problem, and then twigged that the module silverstripers/markdown was the cause. This PR simply removes leading and trailing whitespace from each line of the injected form. The lack of 4 leading spaces means that the form renders, and it should of course not affect the form rendering when the markdown module is not installed.

TheBnl commented 6 years ago

Hi @gordonbanderson

Thanks for this! Wouldn't have thought about that edge case! I'll tag the fix so you can update your modules.

gordonbanderson commented 6 years ago

Cheers