About This
I am Michael Tyson, and I run A Tasty Pixel. I write on a variety of technology and software development topics as I travel around Europe in a motorhome.
-
Subscribe to updates 203 feed subscribers
Follow me on Twitter 367 followers
Newsletter
Let us keep you informed about important updates, special offers, and new products. Just type in your email address below and hit enter to sign up!
My Products
Popular Posts
- "Elegant Grunge" Wordpress theme
- Using RemoteIO audio unit
- Custom Permalinks
- Connecting an iMac up to your TV
- Smart 404 for Wordpress
- UIImage, resolution independence and the iPhone 4's Retina display
- Flickrpress: Wordpress Flickr widget
- Easy rounded corners on UITableViewCell image view
- Making UIToolbar and UINavigationBar's background totally transparent
- Sort your Flickr photostream
A OS X service to encode HTML characters
I find myself frequently writing HTML code in comment forms which support use of HTML formatting, which means that I have to encode the html entities if I want them to show up (as in representing ‘>’ with ‘>’, for example).
This gets rather tiresome, particularly if there’s a fair chunk of text to encode by hand.
I used the always-useful ThisService app with a short PHP script which does a htmlspecialchars() on whatever’s passed to it, to create a OS X service called ‘Encode HTML‘. Put it in your Library/Services directory, possibly log out and back in again, and you’ll be set.
Select the text to encode, click the system menu, Services, Encode HTML, and it’ll be automatically encoded in place.
Related posts