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
.php4extension 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. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access