expose some utility functions so extended tags can use them
move trim to the utils file