Fork me on GitHub

allowedHTML ??  Bottom

  • How is allowedHTML implemented in a module? If I allow HTML input in my module, is disallowed HTML stripped out somewhere along the line automatically (DBUtil::insertObject ??). I know that using DataUtil::formatForDisplayHTML() eliminates it from display, but is it ever stripped before entering the DB?

    ultimate question: Do I need to do something in my module as I validate my user entry to ensure security in my module or is this handled automatically?
  • The AllowedHTML is a responsability of the "Presentation Layer", then, your templates are the responsible ones to strip the not allowed tags with |pnvarprepfordisplay. But those settings can change in different ways, like change the output filter to Internal instead SafeHTML, so, makes no sense to strip them when storing the data in the Database.

    DBUtil sanitizes the data that you're storing in the data base. If you're performing "manual" SQL queries, use DataUtil::formatForStore for each variable in that SQL.

    --
    - Mateo T. -
    Mis principios... son mis fines
  • 0 users

This list is based on users active over the last 60 minutes.