Hi.

Thank you for this module.

I have noticed that you have used hook_node_presave() and hook_taxonomy_term_presave(). But it will be better to use hook_entity_presave() instead. With hook_entity_presave() it will be possible to preprocess comments, user fields and other entities.

We have main problems with comments, so I will try to help you with this issue.

Comments

AlexKirienko’s picture

Assigned: Unassigned » AlexKirienko

I'm working on this issue.

timodwhit’s picture

@AlexKirienkoex, I have a fix in place for comments using entity_presave. I am currently working on supporting field_collection and beans as well. Are there other entities that are heavily used?

Thanks for bringing this up.

AlexKirienko’s picture

StatusFileSize
new5.36 KB

I have demand for profile2 profiles, but profile2 don't use entities. So I will create separate issue for it.

Please check attached patch.

AlexKirienko’s picture

Status: Active » Needs review
timodwhit’s picture

Status: Needs review » Needs work

@AlexKirienkoex: It looks like we submitted changes around the same time. Please check out the latest changes, it looks like my current interation is missing signature. from the user, but most of the other stuff is covered in the "if" cases.

Also, for profile2, it might be good to have submodule emoji_scrub_profile2, that can be enabled on top of the emoji_scrub.

AlexKirienko’s picture

Status: Needs work » Needs review
StatusFileSize
new2.27 KB

Great.

Please check attached patch with some enhancements.

- Instead of 'und' better use LANGUAGE_NONE constant.

- emoji_scrub_entity_presave need to be executed first, emoji_scrub_module_implements_alter implemented.

- use foreach instead of many if()

timodwhit’s picture

Status: Needs review » Closed (fixed)

Thanks for the contribution. Your patch was added! Nice work.

AlexKirienko’s picture

Great, thank you!