Code Rewriting Preferences

The Preferences dialog box’s Code Rewriting category controls whether and how HTML code is modified when Dreamweaver opens a document. It can be used to clean up HTML or leave it alone. Also see Chapter 7.

Fix Invalidly Nested and Unclosed Tags

If enabled, Dreamweaver corrects improperly nested HTML tags. For example, <p><b>text</p></b> is rewritten as <p><b>text</b></p>.

Remove Extra Closing Tags

If enabled, Dreamweaver corrects closing tags with no corresponding opening tag. For example, if it finds a </p> element without a corresponding <p> element, it adds the <p> element to preserve spacing, but it deletes a </b> element if no matching <b> element is found.

The following two options are active only if at least one of the preceding two options is enabled:

Warn when Fixing or Removing Tags

If enabled, Dreamweaver summarizes the fixes it made when opening the document. It doesn’t let you confirm the changes, it just informs you of the changes it made. If you want to abort the changes, don’t save the document.

Never Rewrite Code in Files with Extensions...

Use this option to prevent Dreamweaver from changing HTML code within the listed types of files (defaults to .asp, .cfm, .cfml, .ihtml, .js, .jsp, .php, and .php3). For example, add the .php4 extension to prevent Dreamweaver from rewriting PHP code.

Encode Special Characters in URLs Using %

Encodes special characters in URLs using their hexadecimal ASCII values to ensure that web servers recognize them properly. ...

Get Dreamweaver in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.