Filtering Special Characters Injected by Microsoft Word
I have been having trouble with users pasting content directly from M$ Word into admin fields, so I set out to create some sort of filter that replaces these little terds with something more HTML friendly. Here’s what I came up with, efficiency aside:
Please fork and enhance if you find more of these evil demon characters anywhere.
I guess it should also be noted that this can be called from any model save method on fields that you wish to filter.
UPDATE:
Just use SmartyPants: http://pypi.python.org/pypi/smartypants/
No comments yet.
Leave a comment
Search
What I'm Doing...
- Everyone that considers themselves a Mizzou fan can... well, go fsck themselves. #checkyofilesystem 13 hrs ago
- Missouri sucks. Period. 13 hrs ago
- @aaronky seat's taken brah! You're not welcome in these parts. in reply to aaronky 15 hrs ago
- More updates...
Powered by Twitter Tools
del.icio.us
Tags
album
api
california
code
cron
cURL
development
django
django1.1
donuts
employment
evansanidiot
hack
handy
javascript
jcarousel
jquery
js
lala
mahalo
move
music
nerdery
nonsense
nonsense personal evan
opinion
personal
playlist
python
rails
ramblings
random
remix
remixes
STS9
tips
triple-monitor
twitter
ubuntu
unicode
upgrade
urllib
wordpress
wordpressisawesome
xorg

Social Links