1

When I am rendering fields I noticed that if the user selects "full html" as the WSYWIG text format on a "long text" field, a safe value is not created. For example the array would be:

value (String, 14 characters ) <div>test</div> 
format (String, 9 characters ) full_html

But if "Filtered HTML" input selected it would be:

value (String, 14 characters ) <div>test</div> 
format (String, 9 characters ) full_html
safe_value (String, 4 characters ) test

Settings to Full HTML seem to have no effect.

What controls whether a safe value is created?

0

The core text module does. This logic is driven by the text module's text_field_load(), an invocation of hook_field_load(). When the module loads text fields it looks up the filters used for the text format and sees if it's cacheable (i.e. if it saves to safe_value).

In your case, the logic is being triggered by toggling the filtered_html / full_html formats. Because raw HTML is potentially unsafe, it's not stored in the save_value cache. `

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.