Dreamweaver

Set the code rewriting preferences

Use the code rewriting preferences to specify how and whether Dreamweaver modifies your code while opening documents, when copying and pasting form elements, and when entering attribute values and URLs using tools such as the Property inspector. These preferences have no effect when you edit HTML or scripts in Code view.

If you disable the rewriting options, invalid-markup items are displayed in the Document window for HTML that it would have rewritten.

  1. Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh).
  2. Select Code Rewriting from the Category list on the left.
  3. Set any of the following options:
    Fix Invalidly Nested and Unclosed Tags
    Rewrites overlapping tags. For example, <b><i>text</b></i> is rewritten as <b><i>text</i></b>. This option also inserts closing quotation marks and closing brackets if they are missing.

    Rename Form Items When Pasting
    Ensures you don’t have duplicate names for form objects. This option is enabled by default.
    Note: Unlike the other options in this preferences dialog box, this option does not apply when you open a document, only when you copy and paste a form element.

    Remove Extra Closing Tags
    Deletes closing tags that have no corresponding opening tag.

    Warn When Fixing Or Removing Tags
    Displays a summary of technically invalid HTML that Dreamweaver attempted to correct. The summary notes the location of the problem (using line and column numbers) so that you can find the correction and ensure that it’s rendering as intended.

    Never Rewrite Code: In Files With Extensions
    Allows you to prevent Dreamweaver from rewriting code in files with the specified filename extensions. This option is particularly useful for files that contain third-party tags.

    Encode <, >, &, And " In Attribute Values Using &
    Ensures that attribute values that you enter or edit using Dreamweaver tools such as the Property inspector contain only legal characters. This option is enabled by default.
    Note: This option and the following options do not apply to URLs that you type in Code view. Also, they do not cause existing code already in a file to change.

    Do Not Encode Special Characters
    Prevents Dreamweaver from changing URLs to use only legal characters. This option is enabled by default.

    Encode Special Characters In URL Using &#
    Ensures that when you enter or edit URLs using Dreamweaver tools such as the Property inspector, those URLs contain only legal characters.

    Encode Special Characters In URL Using %
    Operates the same way as the preceding option, but uses a different method of encoding special characters. This encoding method (using the percent sign) may be more compatible with older browsers, but doesn’t work as well with characters from some languages.

    Insert Using Browser-safe Scripts
    Ensures that active content that you insert with Dreamweaver uses tags that will display the content correctly in the latest versions of Internet Explorer. By default, Dreamweaver only uses browser-safe scripts for Flash and Shockwave active content. The feature is extensible, however, and allows you to use third-party extensions to insert other kinds of active content correctly.

    Convert Tags To Scripts On File Open
    Renders <object>, <embed>, and <applet> tags null and adds the appropriate JavaScript tags upon opening files that contain active content.