- πΊπΈUnited States laryn
This seems like a good idea. I just ported the module to Backdrop and incorporated a commit based on this issue/patch:
I also included
trim
to take out leading/trailing whitespace after stripping the tags out.
alt attribute sould not contain any html tags and we have to care about that if tokens take their value from fields containing html formating. Here a solution with strip_tags:
around line 147 (imagefield_tokens_field_widget_process)
$element['alt']['#default_value'] = isset($item['alt']) ? strip_tags($item['alt']) : $settings['alt_field_default'];
$element['title']['#default_value'] = isset($item['title']) ? strip_tags($item['title']) : $settings['title_field_default'];
then at the end of the file (imagefield_tokens_field_attach_presave)
$field_data['title'] = strip_tags($field_data['title']);
$field_data['alt'] = strip_tags($field_data['alt']);
Active
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
This seems like a good idea. I just ported the module to Backdrop and incorporated a commit based on this issue/patch:
I also included trim
to take out leading/trailing whitespace after stripping the tags out.