The "Set a data value" action appears to ignore the source value's HTML. This could be an issue with rules or it could be an issue with text formats. Please reassign if so.

Via a rules component, I'm setting the value of a Long text field on a message entity with the value of a body field from a referenced node. The message is created via "Create a new entity" within this rule and provided as the variable "message_created". Then data values are set.

"Set a data value" is modifying the selector:
message-created:field-comment:value
With the source value:
<node-parameter>:body:value

Both fields are set to the "Filtered HTML" text format.

With only the "Convert line breaks into HTML" filter on

The value of the source field from "Show a message on the site" via the rule is:

<p>line 1</p>
<p>line 2</p>
<p>line 3</p>

While the value of field-comment on the resulting entity and "Show a message on the site" is:

<p>
line 1<br>
line 2<br>
line 3
</p>

With no input filters enabled on the "Filtered HTML" text format

The value of the source field from "Show a message on the site" via the rule is:

<p>line 1</p>
<p>line 2</p>
<p>line 3</p>

While the value of field-comment both on the resulting entity and "Show a message on the site" is:

line 1

line 2

line 3

(not sure about the spacing, does confuse things further)

"Set a data value" appears to ignore the HTML of the source value, and then run the text format's filters again.

For this testing field_comment was set to "Filtered HTML" with "Limit allowed text formats" checked. [message-created:field-comment:format] was set to Filtered HTML in the rule. Similar results happen with similar filter setups.

Comments

Maedi created an issue. See original summary.

Maedi’s picture

Issue summary: View changes
Maedi’s picture

Status: Active » Closed (works as designed)

Resolved by replacing tokens with [message-created:field-comment] and [node:body]... removing value.