Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
would it be possible to add a 'br' tag to the followline line in bean.module?
'subject' => isset($bean->title) ? filter_xss($bean->title, $allowed_tags = array('em', 'strong', 'i', 'b')) : '',
as far as I can tell, this is the only way I can allow for break tabs in titles in beans, hook_block_view_alter won't work.
Comment | File | Size | Author |
---|---|---|---|
#12 | interdiff-2636460-10-12.txt | 1.11 KB | Samvel |
#12 | bean_title_allowed_tags-2636460-12.patch | 2.42 KB | Samvel |
| |||
#10 | interdiff-8-10.txt | 1.33 KB | Samvel |
#10 | bean_title_allowed_tags-2636460-10.patch | 2.42 KB | Samvel |
| |||
#8 | bean_title_allowed_tags-2636460-8.patch | 2.52 KB | Samvel |
|
Comments
Comment #2
markchitty CreditAttribution: markchitty as a volunteer commentedComment #3
kevster CreditAttribution: kevster commentedGood idea @markchitty - I would find this very useful too - dont want to be hacking the module for obvious reasons.
Comment #4
abbym CreditAttribution: abbym at Third and Grove commentedThis patch adds
<sup>
and<sub>
as well as<br>
, per the needs of a client.Comment #5
abbym CreditAttribution: abbym at Third and Grove commentedComment #6
DamienMcKennaA better approach would be to add a hook which would allow other modules to modify the list.
The hook should allow an array of allowed tags, which could then be modified by other modules as needed.
Comment #7
Samvel CreditAttribution: Samvel at DrupalJedi commentedIntegrated hook and alter to allow other modules modify allowed tags for title field, as said @DamienMcKenna
Patch attached.
Comment #8
Samvel CreditAttribution: Samvel at DrupalJedi commentedAttached new patch with explanations in bean.api.php
Comment #9
DamienMcKennaI don't think we need two hooks for such a tiny feature request, so bean_bean_title_allowed_tags() could be merged into bean_get_title_allowed_tags() and then remove the extra module_invoke_all().
Comment #10
Samvel CreditAttribution: Samvel at DrupalJedi commentedProvided new patch and interdiff with previous patch.
Comment #11
DamienMcKennaMinor polish.
Comment #12
Samvel CreditAttribution: Samvel at DrupalJedi commented