special character handling

Michael P. Soulier msoulier at nortelnetworks.com
Wed Oct 31 10:42:41 EST 2001


    Hello. 

    When I'm coding in PHP, my job is made very easy due to the existence of
functions that automagickally protect special characters with backslashes,
translate special html characters to their corresponding html entities, strip
all but allowed html tags, etc. I've looked in latest Python docs, and the
Vaults of Parnassus, and I have yet to find such generic, ready-to-use
functions. 
    It's true that I could create some of this using the existing internet and
markup data handling classes, but the point is that they're not made yet.
Before I go to the trouble of writing such a library, as I'd rather use Python
than PHP, does anyone know if someone has beaten me to it?

    I'm thinking of such generic functions as

    addslashes(), stripslashes(), striphtml(), etc. 

    If not, anyone here is of course welcome to help me write such a library,
and I'll ensure that it ends up in tvop. 

    Thanks,

    Mike

-- 
Michael P. Soulier, TD12, SKY  Tel: 613-765-4699 (ESN: 39-54699)
Optical Networks, Nortel Networks, SDE Pegasus
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort."  -Harley Hahn, A Student's Guide to Unix



More information about the Python-list mailing list