My database connection generally resides in a wrapper, so there's a bit of context for the functions:
//escapes data using standard methods - ie. mysql_real_escape_string()
$db->escapeData();
It sounds like you're making these functions external as part of a procedural library, and they do a little extra work on the string, so I'd probably go with something like:
sanitizeDbData();
I'm a PHP programmer, and PHP has a built in htmlspecialchars()
function. It's got a nice simplicity to it. If you're not using PHP, I'd simply make htmlSpecialChars()
the conversion function, or possibly htmlEntities()
.