I know HTML should work fine inside Markdown, but I’m having no luck inserting a form, specifically a PayPal donate button.
It seems to strip the tag from the code when saved.
Code:
<form action="https://www.paypal.com/donate" method="post" target="_top">
<input type="hidden" name="hosted_button_id" value="value here" />
<input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" title="PayPal - The safer, easier way to pay online!" alt="Donate with PayPal button" />
<img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1" />
</form>
After saving:
I’ve also tried putting the PayPal HTML inside a snippet, but that then shows nothing at all.
Any help much appreciated!
daft
#2
This may be a result of indentation. If you post it like this, does it help?
<form action="https://www.paypal.com/donate" method="post" target="_top">
<input type="hidden" name="hosted_button_id" value="value here" />
<input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" title="PayPal - The safer, easier way to pay online!" alt="Donate with PayPal button" />
<img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1" />
</form>
Unfortunately not. Looking in the Web Developer tools, it looks like the <form>
tags still get stripped, and it all gets wrapped in <p>
.
Is it stored in your database with the tags ? If they are stripped while rendering, does it help adding twig filter |raw?
Thanks for your reply. No, the HTML isn’t from the database — it’s pasted into the Markdown textarea (on a Static Page).
daft
#6
@tillathenun Sorry if I missed this, but are you running the latest version of October CMS?
It’s the latest version, yes.
I’m an utter fool by the way. It’s the Rich Editor, not Markdown.
I’ve been staring at this website far too long!
The issue still applies anyway. (Sorry for the confusion though.)
1 Like
daft
#8
Oh, if it is the rich editor you may need to allow the form
tag in the editor settings.
Here’s where the setting is: Settings → Editor Settings → Markup Tags
Thanks so much — sorry if I missed that in the docs!
1 Like