Well, of course you can make your own functions to do these things. Use the current function as a model.
We have regularized Zenphoto so that it is consistent. All strings used internally are presumed to need html encoding. This way nothing is left to chance. Strings which typically would contain html tags are encoded by a special function that scrubs invalid tags, encodes html entities, and passes valid tags through. This function is not invoked for strings that typically do not require html tagging since it is an expensive process.
All this is so that hackers cannot sneek exploits into your site.