I have a html form where people submit among many things an abstract for a presentation. I've come across mathematics persons who's abstracts call for super/subscripts in the text to be meaningful and correct.
My though was to either inform the user or provide buttons for "begin subscript" "end subscript" etc. which insert right where their cursor is "[sub]" "[/sub]" (you can imagine the same for superscript). I can't/don't wish to use regular html/xhtml tags because I strip tags on the server side as to not allow jokers to format things interestingly when page data is redisplayed. Just before the string is stored in database, along with a function to escape single quote, I would add in regular expression replace for "[sub]" and "[/sub]" etc. to become "<sub> and "</sub" etc.
This also creates more peculiarities in the fact that at a certain point I would have to go through a take out any formatting done for web displaying and change it to what would be needed for printing in a booklet.
What have others done? Does this sound like a decent approach?