AGNR Groups

Web Groups for the College of Agriculture &
Natural Resources and Affiliates

Weird text appears in published pages

When I view my published page, I see weird text that doesn't show up when I'm editing it. How do I get rid of it?

The "weird" text that sometimes appears on pages often looks something like this:

Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:"";}

This is formatting code that comes from Microsoft Office applications.

Usually when you paste from Word or another Office program, this won't happen, but every so often, Drupal fails to clean it up properly. When you see this code in your content, you will have to manually remove it in HTML view. Here's how.

  1. Open the page for editing.
  2. Click the "HTML" button in the toolbar.
  3. Look for the unwanted code in the new window that opens, select it and delete it.
    • Usually the MS code will end with a curly brace: }
    • If you see the following string of characters in the HTML: <!--[if , delete it and everything after it, up to and including the last instance of the following string: <![endif]-->
    • Any tags that contain a colon (for example <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" Name="List Bullet 4"/>) are typically MS Office formatting tags and can be safely deleted
    • Make sure you don't accidentally delete any of your own text.
  4. Click the update button in the HTML window. You will be returned to the regular editing screen.
  5. Save the page.

Usually this will remove the unwanted text from your content.

If for some reason it doesn't, as a last resort, you can copy all the text, open the HTML view, delete everything and update, go back to the editing screen, click the Paste as Text button (). Be forewarned, this will remove all formatting including headings, images, and links.