core
core copied to clipboard
allow_html does not default to true for redactor field
Hi all,
It seems the allow_html
option does not default to true in the redactor field. The content is being rendered with the HTML tags in it.
Details
Question | Answer |
---|---|
Relevant Bolt Version | 5.0 |
Install type | Composer |
PHP version | 7.3 |
Web server | Symfony local server |
Reproduction
- Declare a content type with a redactor field and add some content to it.
- Render the content in a template
Expected result
Content is rendered without HTML tags
Actual result
Content is being rendered with HTML tags
Are you sure about this?
I've created a fresh project, and in the template for a "page" i do this:
<h1>{{ record|title }} {{ edit(record) }}</h1>
<hr>
{{ record.body }}
<hr>
It renders with the HMTL intact:
![image](https://user-images.githubusercontent.com/1833361/136234147-81a60884-dbfc-40d8-9ac5-7d95d373c5e9.png)
is {{ edit(record) }}
new to v5? I couldn't find it in the docs