tags:

views:

136

answers:

1

I'm looking for a server-side (C#) approach to cleaning up content pasted from MS Word. I know that a lot of the Rich Text Editors like FCKEdit have this ability built in, but I'd like to handle it on the backend to make it as seamless as possible to the user.

Jeff posted an approach to doing this

http://www.codinghorror.com/blog/archives/000485.html

but that's over three years old. Are there any better approaches to doing this?

A: 

Having had to deal with similar things in the past (and generally stuck with the editor's built in options), I'd say that Jeff's regex collection looks about right - I've not tested it, but it seems to cover most of the weird markup (all the <o:p> type tags for example) that word adds.

Zhaph - Ben Duguid