Help - Search - Members - Calendar
Full Version: converting html entities
Movable Type Community Forum > Additional Resources > Tips and Tricks
raynebair
Is there any shortcuts that have already been made that can go through my entries and change &, <, > and other common characters to their html equivalents.

This is required to not break a page's validation just by adding a post.
KafkaesquĆ­
See the information on encode_html and encode_xml in the template tags section of the MT manual (under global tag attributes).
girlie
You wouldn't want to use those attributes on the MTEntryBody tag in your normal templates, because then it would convert characters you don't want to convert - such as in links, the breaks MT adds, and so on.

I use a decoder bookmarklet when composing entries to convert certain characters.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.