Discussion posts showing hidden code

Discussion posts showing hidden code

by Tara Thompson -
Number of replies: 3
Whether in the creation of the forum or within posts, we get users reporting hidden code that shows in the forum upon posting their content but it does not show when they are creating the content.

For example, the following text shows up before the added content on a forum a teacher created today: <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri;

and so on...(I don't want to paste it all here)

It also happens when users post to a forum,

<!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {mso-style-noshow:yes; mso-style-priority:99; color:purple; mso-themecolor:followedhyperlink; text-decoration:underline; text-underline:single;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} -->

All instances seem to occur when the user cuts and pastes but not all cut and paste posts include this extra coding.

Thoughts?

Thanks!
Average of ratings: -
In reply to Tara Thompson

Re: Discussion posts showing hidden code

by Greg Kraus -
It sounds like they are cutting and pasting from Microsoft Word. Word is notorious for adding this code in. The work around I use is to copy and paste in to Notepad (Windows) or TextWrangler (Mac) first, then recopy and paste into Moodle.

I hope this helps.

Greg
Average of ratings: Useful (2)
In reply to Greg Kraus

Re: Discussion posts showing hidden code

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Another way of removing the MS Word formatting is to use the 'Clean Word HTML' button in the HTML editor.
In reply to Helen Foster

Re: Discussion posts showing hidden code

by Paul P. -
Unfortunately, this only works for Word 2003 and under. The cleaner doesn't make a dent in the extra garbage Word 2007 throws in. There is a tracker on this issue here.

I guess we're stuck with notepad a little while longer...