Knowledge Base

What does ‘auto-XHTML’ do exactly?

The “Auto-XHTML” formatting option in ExpressionEngine is designed to output your field entry content as valid XHTML.  The following things are done to the content:

- Paragraphs are wrapped in <p><p> tags.  Text that is separated by two or more line breaks/carriage returns will have the paragraph tags wrapped around each “block” of text.  If there are no carriage returns in the content, then the content will be automatically wrapped in a single set of paragraph tags.

- Lone carriage returns are replaced with HTML line break tags: <br />

- Ampersand characters (&) are converted to the appropriate character entity (&amp;).  Ampersand characters that are already part of a character/numeric entity will be left alone

- A series of three periods (...) will be converted into an ellipsis character (…)

- Single- (’) and double-quotes (") are converted into typographically correct “curly quotes”: “ ” ‘ ’

- PHP code is automatically converted to character entities

- HTML code is converted to character entities if the weblog settings do not allow HTML in the entries (if HTML is allowed, then the HTML will be left alone)

- pMcode is parsed

These changes to the content are performed when the content is pulled out of the database and prepared for display.  All of the content remains unchanged when it is stored in the database.

Last Updated on Aug 05, 2004 at 17:22   ( Permalink )
Category: ExpressionEngine Basics