1

Topic: htmLawed suggestion: 'hook_tag' and 'hook' using is_callable()

It would add a lot of flexibility to htmLawed implementation if these two config parameters were verified using is_callable() rather than function_exists(), then called using call_user_func().

This is something I've been manually editing into the library for a few years now in order to encapsulate the called hook functions as static methods of my project's existing sanitizer class (which serves as a façade for htmLawed or similar libs).

Could this approach be officially incorporated into htmLawed in a future release?

2

Re: htmLawed suggestion: 'hook_tag' and 'hook' using is_callable()

Thanks Adam for this suggestion. I will soon issue a minor release with this change.

3

Re: htmLawed suggestion: 'hook_tag' and 'hook' using is_callable()

That's great news. Thanks!

4

Re: htmLawed suggestion: 'hook_tag' and 'hook' using is_callable()

New htmLawed version 1.2.10 released on 5 Nov. 2022 has this change.