You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it is not possible to pass unescaped HTML as an attribute value when passing attributes as an object. This is because the govukAttributes macro indiscriminately escapes all values, even those that have previously been passed through the safe filter.
This is likely an edge case situation, but it may be considered an unexpected outcome, as it directly contradicts the expectations set by using the safe filter.
Description of the issue
Currently it is not possible to pass unescaped HTML as an attribute value when passing attributes as an object. This is because the
govukAttributes
macro indiscriminately escapes all values, even those that have previously been passed through thesafe
filter.This is likely an edge case situation, but it may be considered an unexpected outcome, as it directly contradicts the expectations set by using the
safe
filter.Spun off from #4937.
Steps to reproduce the issue
Pass HTML as a value into a component's
attributes
parameter.Actual vs expected behaviour
Actual
HTML is indiscriminately escaped, despite using the
safe
filter indicating it shouldn't be escaped.Expected
HTML is not escaped due to use of
safe
filter.Additional information
This does not happen if the
attributes
are passed as a string instead. This can be used as a workaround in the meantime.Environment
The text was updated successfully, but these errors were encountered: