jordanlev Posted September 13, 2014 Share Posted September 13, 2014 Some other frameworks and CMS's I've used have a handy function called "h", which is a shortcut to htmlspecialchars($string, ENT_QUOTES, 'utf-8'). This makes it super-easy to escape output in your templates. I don't see anything like this in ProcessWire, so I'm wondering what is the best way to define a utility function like this that is available to the entire codebase (I intentionally want it to be in the global namespace)? Ideally this would be in my /site/ directory (not /wire/), but it could also be in an installable module I suppose. Thanks. Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now