0

I’m attempting to to create a text input box on my ‘about’ section on Patreon. They have an HTML editor to add elements, and I’m attempting to input the following code-

<textarea rows="4" cols="50"> Test </textarea>

However, when I save the changes and come back to the page, it has converted this to be displayed as plain text within the HTML-

&lt;textarea rows="4" cols="50"&gt; Test &lt;/textarea&gt;

Any idea why this change is happening?

Taytee13
  • 121
  • 1
  • 1
  • 11

2 Answers2

1

My bet is that the "HTML" editor is only supposed to allow you to use formatting tags like <p>, <h1>, etc, and the tag you are trying to add is getting sanitized by their XSS sanitizer.

I don't have any ideas on how to achieve what you want though, because this is a "feature".

Exr0n
  • 358
  • 1
  • 9
  • Thanks for your answer. So in other words, they simply wouldn’t allow that to happen if that was the case- correct? Thanks! – Taytee13 Dec 29 '19 at 01:40
  • Yes, but you should check out @Hubert 's answer first, he might have found a solution. – Exr0n Dec 29 '19 at 01:50
0

According to the Patreon website at https://blog.patreon.com/adding-custom-elements-about-section you can enable a plain code mode in the editor which will allow you to use any HTML.

enter image description here

Hubert Grzeskowiak
  • 15,137
  • 5
  • 57
  • 74
  • Hey Hubert! This plain code mode IS what I’m utilizing in order to add the code initially. The text area I’m attempting to add displays when I head back to the normal editor for viewing, but when I click save changes on my account page it then converts it the code to plain text! – Taytee13 Dec 29 '19 at 01:52
  • 1
    @Taytee13 I see. If the editor itself doesn't tell you what parts of HTML are allowed, you might want to ask their support. – Hubert Grzeskowiak Dec 29 '19 at 04:22