Ticket #1254 (closed Bug: invalid)

Opened 7 years ago

Last modified 3 months ago

Paste from Word is breaking something

Reported by: ajos1 Owned by:
Priority: Normal Milestone:
Component: Plugin : Paste from Word Version:
Keywords: Pending Cc:

Description (last modified by martinkou) (diff)


fckeditor/editor/dialog/fck_paste.html

CleanWord( oNode, bIgnoreFont, bRemoveStyles )

Line 135:

html = html.replace( /\s*mso-[^:]+:[^;"]+;?/gi, '' ) ;

I have 5 word articles that have been giving me grief... they might not be an issue with current word versions... as they are dated September 2005 .

I think line 135 should be:

html = html.replace( /\s+mso-[^:]+:[^;"]+;?/gi, '' ) ;

Otherwise the example at the end... gets corrupted... and starts with the corruption starting at:

<B style=
<P class=MsoNormal style='MARGIN: 0cm 0cm 0pt'><B style='</SPAN></P><P class=MsoNormal style='MARGIN: 0cm 0cm 0pt'> ...

Once I have...

html = html.replace( /\s+mso-[^:]+:[^;"]+;?/gi, '' ) ;

It does not get corrupted...


<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Deeper Love<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></B></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Artists: U-Facilities feat. Caroline<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Remix arists: Stonebridge, Joe Moreno and Guy Gerber.<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Label: Tishomingomusic<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Release: Out Now<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Rating: 8 out of 10<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">&nbsp;<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Keywords: </SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Related artists: Danny Tenaglia, Danny Howells, Deep Dish<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><I style="mso-bidi-font-style: normal"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">&nbsp;<o:p></o:p></SPAN></I></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><I style="mso-bidi-font-style: normal"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">The Danish producer U-Facilities delivers the official anthem for the Danish Dj Awards 2005. <o:p></o:p></SPAN></I></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><I style="mso-bidi-font-style: normal"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Although the name might not ring a bell immediately, U-Facilities is known for a long list of house and clubhouse productions. <o:p></o:p></SPAN></I></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">&nbsp;<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">A look at the tracklist teaches us that this release comes with 2 remixes, next to the original version. No one less than Stonebridge signed for a remix on the B-side, while house veterans Joe Moreno and Guy Gerber take care of the second remix on this release.<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Let&#39;s start with the original version. The track starts off with a solid kick, minimal percussion, and oddly sampled vocals. The introduction is a bit minimal, but it sure is groovy, especially when echoing bongos and woodblock sounds are introduced. A groovy start so far!<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">The introduction slowly builds up and we can hear some cool old school synthesizer tones just before the track reaches his first climax.<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">The kickdrum becomes more solid after the &#39;opening&#39; of the track and some really cool female vocals are introduced. At this moment, the track turns into a serious club tune!<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">The strange thing is that this track sounds dark and sunny at the same time. The vocals sound a bit like a melancholic pop song while the sounds are made up out of spacey effects and hypnotising, lounge-like synthesizers.<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Another remarkable thing is the diversity and choice of sounds.<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">The track knows an incredible variety of cool effects without being &#39;overproduced&#39;, and the overall sounds really hot groovy.<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Another fantastic house tune, which can easily be called a hybrid of various styles. Try to imagine a solid club tune filled with lounge effects and you would come as close as this tune. Nice work!<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">The remix by Stonebridge chooses for an uptempo, more latinhouse orientated approach.<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">The tracks starts off with an irresistible introduction consisting of a filtered kick and rhythmic shakers. This might sound a bit uninspired, but it definitely makes you wanna shake that booty!<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">The vocals are maintained in this remix, although they are used in such a way that they make up a perfect latinhouse track. This is typical Stonebridge style: an uptempo, high quality track, improved with funky vocals and those good old echoing synths.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">An incredibly sexy and rough remix! Respect!<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">&nbsp;<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">The third track on this release is the Guy Berber vs. Joe Moreno mix.<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">These guys have been working in the dance scene for a long time and are known for their co-operations with artists from well-known labels such as Bedrock, Twisted and Kinky Vinyl.<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Their remix is totally different than what you might expect from a clubby latinhouse track, and perhaps that is the reason why it&#39;s so incredibly good!<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">&nbsp;<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">This is definitely the most powerful track on the vinyl, starting off with a solid and punchu kick together with strange &#39;Darth Vader breathe&#39; sounds, manipulated, robotic sound effects and eerie noise.<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">After this wicked intro, a low, phat bassline is added to the rhythm, creating a rough basis for the rest of the track. This kick ass! <o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Just when you might think you&#39;re dealing with a serious House and Electro hybrid, the familiar vocals from the original version are introduced, but they are sampled in such way that the electro feeling takes control. <o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">The track can be described as an insane, robotic mix of house and electro filled with cracking sounds, futuristic beeps and effects and an incredible amount of punk! <o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">It might be a bit surprising to encounter a version like this on a house record, but give it a try and you&#39;ll be hooked to your speaker!<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">&nbsp;<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Conclusion:<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">U-Facilities got it going on! The original version is a funky, high quality floorfiller featuring awesome effects and vocals that will definitely be a big success among both dj&#39;s and party people the coming months. Without sounding cheesy, the track features all elements that you may expect from a quality clubber.<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Stonebridge delivers a fantastic remix with respect to the original version.<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">This one is more uptempo with lots of latinhouse influences that is bound to rule the dancefloors!<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">The remix by Joe Moreno and Guy Gerber is an awesome electronic experiment filled with futuristic elements creating a punky, powerful tune not to be messed with. <o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">A fantastic release with 3 high quality tracks and a must-have for all you house freaks out there! <o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><SPAN style="mso-spacerun: yes">&nbsp;</SPAN><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Youri Jozee (NL)<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">&nbsp;<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><U><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Tracklist:<o:p></o:p></SPAN></U></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">&nbsp;<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">A1. Deeper Love (Original mix)<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">A2. Deeper Love (Stonebridge remix)<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">B1. Deeper Love (Joe Moreno vs. Guy Gerber remix)<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">&nbsp;<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">&nbsp;<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">&nbsp;<o:p></o:p></SPAN></P>

Change History

comment:1 Changed 7 years ago by martinkou

  • Description modified (diff)

Tidied up the description.

comment:2 Changed 7 years ago by alfonsoml

I can't reproduce the problem.

I copy the last line in source view, then switch to design mode and copy all of that. Then in another window I use the paste from Word dialog (in IE or Firefox) and all the content is properly cleaned, I don't see any problem.

comment:3 Changed 7 years ago by alfonsoml

  • Keywords Pending added

comment:4 Changed 7 years ago by fredck

  • Summary changed from fckeditor/editor/dialog/fck_paste.html to Paste from Word is breaking something

Sorry ajos1, but your report is quite confusing. I can't really understand what is getting broken here.

Also, changing "\s*" to "\s+", doesn't seam to have much sense. It is forcing the match to have spaces at the beginning, and we must have then optional instead. Actually your change practically disables that replacement, as most "mso-XXX" attributes are usually alone inside the style attributes. You will have the same results just commenting it.

I would ask you to please provide a simple and small example of code that gets broken, precisely describing what is getting broken there.

comment:5 Changed 6 years ago by ajos1

Sorry for the delay... I have been away in Italy...

I agree with what you say above... and it should stay the way you have it at the moment.

I will get hold of some examples that I have problems with... and see how they need to be fixed without the changing Line 135.

comment:6 Changed 6 years ago by alfonsoml

  • Status changed from new to closed
  • Resolution set to invalid

closing as invalid.

Please reopen if you have a testcase.

comment:7 Changed 3 months ago by fredck

  • Component changed from General to Plugin : Paste from Word
Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy