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.
Some of my feeds are coming in with HTML characters encoded into the title as ' rather then ' . If I were to create a function to search and replace where ' would be converted to ' prior to node save, where in the code would I want to add this?
Thanks,
-C
Comments
Comment #2
MegaChriz CreditAttribution: MegaChriz at WebCoo commentedIn the D7 version of Feeds, the recommended way would be to use the Feeds Tamper module for that, but that module hasn't been ported to D8 yet.
The easiest solution would probably be to implement
hook_node_presave()
in a custom module.For documentation about this hook, see https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!entity.api...
For a similar question (for people who find this issue after a search), see #2706057: Allow targets to provide a default value..
Comment #3
Cromian CreditAttribution: Cromian commentedAh! Good call about using
hook_node_presave()
Thanks!