- πΊπΈUnited States smustgrave
This came up as a daily BSI target
Can you provide real world scenario? Mention needing to store icon characters but my question is the why
#attributes
gets converted into a \Drupal\Core\Template\Attribute
object, with each attribute either needing to extend AttributeValueBase
or being converted to one of Attribute[Array|Boolean|String]
. These all call Html::escape
on their values when converting to a string.
It is common to use data attributes (e.g. data-icon
) to store icon characters coupled with CSS (e.g. content: attr(data-icon);
) to output icons. It's common practice to use unicode html entities for this (e.g. ✔
for a tick). These then get escaped and render garbage.
Add a AttributeEscaped
that you can use to indicate that you have already appropriately filtered and escaped the attribute value, who's __toString
simply returns the value.
Addition of a new attribute for use in contrib.
Postponed: needs info
11.0 π₯
render system
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
This came up as a daily BSI target
Can you provide real world scenario? Mention needing to store icon characters but my question is the why