18.4 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. For
example, the space character, whose ASCII code is 32 is encoded as
%20, because 20 in hexadecimal is equivalent to 32 in decimal. Leave
this option enabled for maximum compatibility.
- Encode <, >, &, and " in Attribute Values Using &
-
Encodes the <, >, &, and " characters as
>, <,
&, and "
within attributes values to ensure that web browsers recognize them
properly. Leave this option enabled for maximum compatibility and
XHTML compliance, unless it conflicts with third-party tags (to avoid
corrupting attributes in server-side scripts, use the "Never
Rewrite Code in Files with Extensions" option).
|