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.
It's possible that recipes may need to be attributed to Internet sources. In fact, it's a requirement in my current project which employs the Recipe module. I overrode the sanitation function in my project, but other people might want to have this ability too. I'd like to add <a> to the list of unfiltered tags for the source field in recipe_node_sanitize().
Current:
if (!empty($node->recipe_source)) {
$node->recipe_source = filter_xss($node->recipe_source, array());
}
Proposed:
if (!empty($node->recipe_source)) {
$node->recipe_source = filter_xss($node->recipe_source, array('a'));
}
Patch to follow.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1542806-source-field-links-1.patch | 538 bytes | dcam |
Comments
Comment #1
dcam CreditAttribution: dcam commentedThe patch alters recipe_node_sanitize() in recipe.module.
Comment #2
dcam CreditAttribution: dcam commentedComment #3
jvandervort CreditAttribution: jvandervort commentedLooks good, committed.