core icon indicating copy to clipboard operation
core copied to clipboard

allow_html does not default to true for redactor field

Open nestordedios opened this issue 2 years ago • 2 comments

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

  1. Declare a content type with a redactor field and add some content to it.
  2. Render the content in a template

Expected result

Content is rendered without HTML tags

Actual result

Content is being rendered with HTML tags

nestordedios avatar Aug 30 '21 12:08 nestordedios

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

bobdenotter avatar Oct 06 '21 15:10 bobdenotter

is {{ edit(record) }} new to v5? I couldn't find it in the docs

eduardomart avatar Oct 10 '21 21:10 eduardomart