I have a security issue. Regular user can edit html web resource and by doing this can run malicious code. D365 warns the user but before that is running the portion of code. What can I do to prevent this?

And the result:

I have a security issue. Regular user can edit html web resource and by doing this can run malicious code. D365 warns the user but before that is running the portion of code. What can I do to prevent this?

And the result:
