josephtklein / jwysiwyg

Automatically exported from code.google.com/p/jwysiwyg
GNU General Public License v2.0
0 stars 0 forks source link

MS Word puts some hideous code in the copy buffer #208

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Copy any content from MSOutlook (that uses msword as editor), that you 
received from a client to insert into database, for example the new office 
address: 
moon street 333 - Downtown
35500-016 - City - State 

2. Paste the content entirely
3. throught the interface looks perfect, as you seem. But when you try to 
insert those values we discover that more come.

What is the expected output?

address=Moon+street%C3%ADba+333+-+Downtown%3Cbr%3E35500-016+-+City+-+state%3Cbr%
3E

What do you see instead?

address=%3Cmeta+http-equiv%3D%22Content-Type%22+content%3D%22text%2Fhtml%3B+char
set%3Dutf-8%22%3E%3Cmeta+name%3D%22ProgId%22+content%3D%22Word.Document%22%3E%3C
meta+name%3D%22Generator%22+content%3D%22Microsoft+Word+12%22%3E%3Cmeta+name%3D%
22Originator%22+content%3D%22Microsoft+Word+12%22%3E%3Clink+rel%3D%22File-List%2
2+href%3D%22file%3A%2F%2F%2FC%3A%255CDOCUME%257E1%255CB%255CCONFIG%257E1%255CTem
p%255Cmsohtmlclip1%255C01%255Cclip_filelist.xml%22%3E%3Clink+rel%3D%22themeData%
22+href%3D%22file%3A%2F%2F%2FC%3A%255CDOCUME%257E1%255CB%255CCONFIG%257E1%255CTe
mp%255Cmsohtmlclip1%255C01%255Cclip_themedata.thmx%22%3E%3Clink+rel%3D%22colorSc
hemeMapping%22+href%3D%22file%3A%2F%2F%2FC%3A%255CDOCUME%257E1%255CB%255CCONFIG%
257E1%255CTemp%255Cmsohtmlclip1%255C01%255Cclip_colorschememapping.xml%22%3E%3C%
21--%5Bif+gte+mso+9%5D%3E%3Cxml%3E%0D%0A+%3Cw%3AWordDocument%3E%0D%0A++%3Cw%3AVi
ew%3ENormal%3C%2Fw%3AView%3E%0D%0A++%3Cw%3AZoom%3E0%3C%2Fw%3AZoom%3E%0D%0A++%3Cw
%3ATrackMoves%2F%3E%0D%0A++%3Cw%3ATrackFormatting%2F%3E%0D%0A++%3Cw%3AHyphenatio
nZone%3E21%3C%2Fw%3AHyphenationZone%3E%0D%0A++%3Cw%3APunctuationKerning%2F%3E%0D
%0A++%3Cw%3AValidateAgainstSchemas%2F%3E%0D%0A++%3Cw%3ASaveIfXMLInvalid%3Efalse%
3C%2Fw%3ASaveIfXMLInvalid%3E%0D%0A++%3Cw%3AIgnoreMixedContent%3Efalse%3C%2Fw%3AI
gnoreMixedContent%3E%0D%0A++%3Cw%3AAlwaysShowPlaceholderText%3Efalse%3C%2Fw%3AAl
waysShowPlaceholderText%3E%0D%0A++%3Cw%3ADoNotPromoteQF%2F%3E%0D%0A++%3Cw%3ALidT
hemeOther%3EPT-BR%3C%2Fw%3ALidThemeOther%3E%0D%0A++%3Cw%3ALidThemeAsian%3EX-NONE
%3C%2Fw%3ALidThemeAsian%3E%0D%0A++%3Cw%3ALidThemeComplexScript%3EX-NONE%3C%2Fw%3
ALidThemeComplexScript%3E%0D%0A++%3Cw%3ACompatibility%3E%0D%0A+++%3Cw%3ABreakWra
ppedTables%2F%3E%0D%0A+++%3Cw%3ASnapToGridInCell%2F%3E%0D%0A+++%3Cw%3AWrapTextWi
thPunct%2F%3E%0D%0A+++%3Cw%3AUseAsianBreakRules%2F%3E%0D%0A+++%3Cw%3ADontGrowAut
ofit%2F%3E%0D%0A+++%3Cw%3ASplitPgBreakAndParaMark%2F%3E%0D%0A+++%3Cw%3ADontVertA
lignCellWithSp%2F%3E%0D%0A+++%3Cw%3ADontBreakConstrainedForcedTables%2F%3E%0D%0A
+++%3Cw%3ADontVertAlignInTxbx%2F%3E%0D%0A+++%3Cw%3AWord11KerningPairs%2F%3E%0D%0
A+++%3Cw%3ACachedColBalance%2F%3E%0D%0A++%3C%2Fw%3ACompatibility%3E%0D%0A++%3Cw%
3ABrowserLevel%3EMicrosoftInternetExplorer4%3C%2Fw%3ABrowserLevel%3E%0D%0A++%3Cm
%3AmathPr%3E%0D%0A+++%3Cm%3AmathFont+m%3Aval%3D%22Cambria+Math%22%2F%3E%0D%0A+++
%3Cm%3AbrkBin+m%3Aval%3D%22before%22%2F%3E%0D%0A+++%3Cm%3AbrkBinSub+m%3Aval%3D%2
2%26%2345%3B-%22%2F%3E%0D%0A+++%3Cm%3AsmallFrac+m%3Aval%3D%22off%22%2F%3E%0D%0A+
++%3Cm%3AdispDef%2F%3E%0D%0A+++%3Cm%3AlMargin+m%3Aval%3D%220%22%2F%3E%0D%0A+++%3
Cm%3ArMargin+m%3Aval%3D%220%22%2F%3E%0D%0A+++%3Cm%3AdefJc+m%3Aval%3D%22centerGro
up%22%2F%3E%0D%0A+++%3Cm%3AwrapIndent+m%3Aval%3D%221440%22%2F%3E%0D%0A+++%3Cm%3A
intLim+m%3Aval%3D%22subSup%22%2F%3E%0D%0A+++%3Cm%3AnaryLim+m%3Aval%3D%22undOvr%2
2%2F%3E%0D%0A++%3C%2Fm%3AmathPr%3E%3C%2Fw%3AWordDocument%3E%0D%0A%3C%2Fxml%3E%3C
%21%5Bendif%5D--%3E%3C%21--%5Bif+gte+mso+9%5D%3E%3Cxml%3E%0D%0A+%3Cw%3ALatentSty
les+DefLockedState%3D%22false%22+DefUnhideWhenUsed%3D%22true%22%0D%0A++DefSemiHi
dden%3D%22true%22+DefQFormat%3D%22false%22+DefPriority%3D%2299%22%0D%0A++LatentS
tyleCount%3D%22267%22%3E%0D%0A++%3Cw%3ALsdException+Locked%3D%22false%22+Priorit
y%3D%220%22+SemiHidden%3D%22false%22%0D%0A+++UnhideWhenUsed%3D%22false%22+QForma
t%3D%22true%22+Name%3D%22Normal%22%2F%3E%0D%0A++%3Cw%3ALsdException+Locked%3D%22
false%22+Priority%3D%229%22+SemiHidden%3D%22false%22%0D%0A+++UnhideWhenUsed%3D%2
2false%22+QFormat%3D%22true%22+Name%3D%22heading+1%22%2F%3E%0D%0A++%3Cw%3ALsdExc
eption+Locked%3D%22false%22+Priority%3D%229%22+QFormat%3D%22true%22+Name%3D%22he
ading+2%22%2F%3E%0D%0A++%3Cw%3ALsdException+Locked%3D%22false%22+Priority%3D%229
%22+QFormat%3D%22true%22+Name%3D%22heading+3%22%2F%3E%0D%0A++%3Cw%3ALsdException
+Locked%3D%22false%22+Priority%3D%229%22+QFormat%3D%22true%22+Name%3D%22heading+
4%22%2F%3E%0D%0A++%3Cw%3ALsdException+Locked%3D%22false%22+Priority%3D%229%22+QF
ormat%3D%22true%22+Name%3D%22heading+5%22%2F%3E%0D%0A++%3Cw%3ALsdException+Locke
d%3D%22false%22+Priority%3D%229%22+QFormat%3D%22true%22+Name%3D%22heading+6%22%2
F%3E%0D%0A++%3Cw%3ALsdException+Locked%3D%22false%22+Priority%3D%229%22+QFormat%
3D%22true%22+Name%3D%22heading+7%22%2F%3E%0D%0A++%3Cw%3ALsdException+Locked%3D%2
2false%22+Priority%3D%229%22+QFormat%3D%22true%22+Name%3D%22heading+8%22%2F%3E%0
D%0A++%3Cw%3ALsdException+Locked%3D%22false%22+Priority%3D%229%22+QFormat%3D%22t
rue%22+Name%3D%22heading+9%22%2F%3E%0D%0A++%3Cw%3ALsdException+Locked%3D%22false
%22+Priority%3D%2239%22+Name%3D%22toc+1%22%2F%3E%0D%0A++%3Cw%3ALsdException+Lock
ed%3D%22false%22+Priority%3D%2239%22+Name%3D%22toc+2%22%2F%3E%0D%0A++%3Cw%3ALsdE
xception+Locked%3D%22false%22+Priority%3D%2239%22+Name%3D%22toc+3%22%2F%3E%0D%0A
++%3Cw%3ALsdException+Locked%3D%22false%22+Priority%3D%2239%22+Name%3D%22toc+4%2
2%2F%3E%0D%0A++%3Cw%3ALsdException+Locked%3D%22false%22+Priority%3D%2239%22+Name
%3D%22toc+5%22%2F%3E%0D%0A++%3Cw%3ALsdException+Locked%3D%22false%22+Priority%3D
%2239%22+Name%3D%22toc+6%22%2F%3E%0D%0A++%3Cw%3ALsdException+Locked%3D%22f ... 
limite de tamanho máximo do Firebug foi atingido pelo Firebug. ... 
id+2+Accent+6%22%2F%3E%0D%0A++%3Cw%3ALsdException+Locked%3D%22false%22+Priority%
3D%2269%22+SemiHidden%3D%22false%22%0D%0A+++UnhideWhenUsed%3D%22false%22+Name%3D
%22Medium+Grid+3+Accent+6%22%2F%3E%0D%0A++%3Cw%3ALsdException+Locked%3D%22false%
22+Priority%3D%2270%22+SemiHidden%3D%22false%22%0D%0A+++UnhideWhenUsed%3D%22fals
e%22+Name%3D%22Dark+List+Accent+6%22%2F%3E%0D%0A++%3Cw%3ALsdException+Locked%3D%
22false%22+Priority%3D%2271%22+SemiHidden%3D%22false%22%0D%0A+++UnhideWhenUsed%3
D%22false%22+Name%3D%22Colorful+Shading+Accent+6%22%2F%3E%0D%0A++%3Cw%3ALsdExcep
tion+Locked%3D%22false%22+Priority%3D%2272%22+SemiHidden%3D%22false%22%0D%0A+++U
nhideWhenUsed%3D%22false%22+Name%3D%22Colorful+List+Accent+6%22%2F%3E%0D%0A++%3C
w%3ALsdException+Locked%3D%22false%22+Priority%3D%2273%22+SemiHidden%3D%22false%
22%0D%0A+++UnhideWhenUsed%3D%22false%22+Name%3D%22Colorful+Grid+Accent+6%22%2F%3
E%0D%0A++%3Cw%3ALsdException+Locked%3D%22false%22+Priority%3D%2219%22+SemiHidden
%3D%22false%22%0D%0A+++UnhideWhenUsed%3D%22false%22+QFormat%3D%22true%22+Name%3D
%22Subtle+Emphasis%22%2F%3E%0D%0A++%3Cw%3ALsdException+Locked%3D%22false%22+Prio
rity%3D%2221%22+SemiHidden%3D%22false%22%0D%0A+++UnhideWhenUsed%3D%22false%22+QF
ormat%3D%22true%22+Name%3D%22Intense+Emphasis%22%2F%3E%0D%0A++%3Cw%3ALsdExceptio
n+Locked%3D%22false%22+Priority%3D%2231%22+SemiHidden%3D%22false%22%0D%0A+++Unhi
deWhenUsed%3D%22false%22+QFormat%3D%22true%22+Name%3D%22Subtle+Reference%22%2F%3
E%0D%0A++%3Cw%3ALsdException+Locked%3D%22false%22+Priority%3D%2232%22+SemiHidden
%3D%22false%22%0D%0A+++UnhideWhenUsed%3D%22false%22+QFormat%3D%22true%22+Name%3D
%22Intense+Reference%22%2F%3E%0D%0A++%3Cw%3ALsdException+Locked%3D%22false%22+Pr
iority%3D%2233%22+SemiHidden%3D%22false%22%0D%0A+++UnhideWhenUsed%3D%22false%22+
QFormat%3D%22true%22+Name%3D%22Book+Title%22%2F%3E%0D%0A++%3Cw%3ALsdException+Lo
cked%3D%22false%22+Priority%3D%2237%22+Name%3D%22Bibliography%22%2F%3E%0D%0A++%3
Cw%3ALsdException+Locked%3D%22false%22+Priority%3D%2239%22+QFormat%3D%22true%22+
Name%3D%22TOC+Heading%22%2F%3E%0D%0A+%3C%2Fw%3ALatentStyles%3E%0D%0A%3C%2Fxml%3E
%3C%21%5Bendif%5D--%3E%3Cstyle%3E%0D%0A%3C%21--%0D%0A+%2F*+Font+Definitions+*%2F
%0D%0A+%40font-face%0D%0A%09%7Bfont-family%3A%22Cambria+Math%22%3B%0D%0A%09panos
e-1%3A2+4+5+3+5+4+6+3+2+4%3B%0D%0A%09mso-font-charset%3A1%3B%0D%0A%09mso-generic
-font-family%3Aroman%3B%0D%0A%09mso-font-format%3Aother%3B%0D%0A%09mso-font-pitc
h%3Avariable%3B%0D%0A%09mso-font-signature%3A0+0+0+0+0+0%3B%7D%0D%0A%40font-face
%0D%0A%09%7Bfont-family%3ACalibri%3B%0D%0A%09panose-1%3A2+15+5+2+2+2+4+3+2+4%3B%
0D%0A%09mso-font-charset%3A0%3B%0D%0A%09mso-generic-font-family%3Aswiss%3B%0D%0A
%09mso-font-pitch%3Avariable%3B%0D%0A%09mso-font-signature%3A-1610611985+1073750
139+0+0+159+0%3B%7D%0D%0A+%2F*+Style+Definitions+*%2F%0D%0A+p.MsoNormal%2C+li.Ms
oNormal%2C+div.MsoNormal%0D%0A%09%7Bmso-style-unhide%3Ano%3B%0D%0A%09mso-style-q
format%3Ayes%3B%0D%0A%09mso-style-parent%3A%22%22%3B%0D%0A%09margin%3A0cm%3B%0D%
0A%09margin-bottom%3A.0001pt%3B%0D%0A%09mso-pagination%3Awidow-orphan%3B%0D%0A%0
9font-size%3A12.0pt%3B%0D%0A%09font-family%3A%22Times+New+Roman%22%2C%22serif%22
%3B%0D%0A%09mso-fareast-font-family%3ACalibri%3B%0D%0A%09mso-fareast-theme-font%
3Aminor-latin%3B%0D%0A%09color%3Ablack%3B%7D%0D%0A.MsoChpDefault%0D%0A%09%7Bmso-
style-type%3Aexport-only%3B%0D%0A%09mso-default-props%3Ayes%3B%0D%0A%09font-size
%3A10.0pt%3B%0D%0A%09mso-ansi-font-size%3A10.0pt%3B%0D%0A%09mso-bidi-font-size%3
A10.0pt%3B%7D%0D%0A%40page+WordSection1%0D%0A%09%7Bsize%3A612.0pt+792.0pt%3B%0D%
0A%09margin%3A70.85pt+3.0cm+70.85pt+3.0cm%3B%0D%0A%09mso-header-margin%3A36.0pt%
3B%0D%0A%09mso-footer-margin%3A36.0pt%3B%0D%0A%09mso-paper-source%3A0%3B%7D%0D%0
Adiv.WordSection1%0D%0A%09%7Bpage%3AWordSection1%3B%7D%0D%0A--%3E%0D%0A%3C%2Fsty
le%3E%3C%21--%5Bif+gte+mso+10%5D%3E%0D%0A%3Cstyle%3E%0D%0A+%2F*+Style+Definition
s+*%2F%0D%0A+table.MsoNormalTable%0D%0A%09%7Bmso-style-name%3A%22Tabela+normal%2
2%3B%0D%0A%09mso-tstyle-rowband-size%3A0%3B%0D%0A%09mso-tstyle-colband-size%3A0%
3B%0D%0A%09mso-style-noshow%3Ayes%3B%0D%0A%09mso-style-priority%3A99%3B%0D%0A%09
mso-style-qformat%3Ayes%3B%0D%0A%09mso-style-parent%3A%22%22%3B%0D%0A%09mso-padd
ing-alt%3A0cm+5.4pt+0cm+5.4pt%3B%0D%0A%09mso-para-margin%3A0cm%3B%0D%0A%09mso-pa
ra-margin-bottom%3A.0001pt%3B%0D%0A%09mso-pagination%3Awidow-orphan%3B%0D%0A%09f
ont-size%3A11.0pt%3B%0D%0A%09font-family%3A%22Calibri%22%2C%22sans-serif%22%3B%0
D%0A%09mso-ascii-font-family%3ACalibri%3B%0D%0A%09mso-ascii-theme-font%3Aminor-l
atin%3B%0D%0A%09mso-fareast-font-family%3A%22Times+New+Roman%22%3B%0D%0A%09mso-f
areast-theme-font%3Aminor-fareast%3B%0D%0A%09mso-hansi-font-family%3ACalibri%3B%
0D%0A%09mso-hansi-theme-font%3Aminor-latin%3B%0D%0A%09mso-bidi-font-family%3A%22
Times+New+Roman%22%3B%0D%0A%09mso-bidi-theme-font%3Aminor-bidi%3B%7D%0D%0A%3C%2F
style%3E%0D%0A%3C%21%5Bendif%5D--%3E%3Cspan+style%3D%22font-size%3A+12pt%3B+font
-family%3A+%26quot%3BTimes+New+Roman%26quot%3B%2C%26quot%3Bserif%26quot%3B%3B+co
lor%3A+black%3B%22%3EMoon+street%C3%ADba+333+-+Downtown%3Cbr%3E35500-016+-+City+
-+state%3Cbr%3E

What version of the product are you using? On what operating system?
latest version. Windows XP, windows 7 ultimate, windows Vista,

Please provide any additional information below.

Original issue reported on code.google.com by bernardo...@gmail.com on 8 Sep 2010 at 4:54

GoogleCodeExporter commented 9 years ago
the hideous code is generated by MS-OUTLOOK i´ve tried the solutions in ISSUE 
129, related to MS WORD ..... but didn´t work of course, the generated code by 
ms outlook is different. I´m not good with regex construction. Thanks

Original comment by bernardo...@gmail.com on 11 Sep 2010 at 4:13

GoogleCodeExporter commented 9 years ago
Hello there

Did you ever get a fix to this?

Having the same problem

Original comment by clay...@tati.co.za on 3 Oct 2012 at 7:48