Make WordPress Core

Opened 9 years ago

Closed 3 years ago

#35334 closed defect (bug) (reported-upstream)

Pasting this text from Google results in alternating letters being linked

Reported by: paulschreiber's profile paulschreiber Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4
Component: Editor Keywords:
Focuses: Cc:

Description

  1. Open this Google doc:

https://docs.google.com/document/d/1uS7hEM_SLjpxkmG5z2v2qeNjJDdM3MYangGGSFUgIBU/edit

  1. Select All and Copy
  2. In WordPress, create a new post
  3. In the visual editor, paste what you copied in step (1)

EXPECTED

Blah foo bar this season (as of last week)

ACTUAL

Blah foo bar this season (as of last week)

(using italics to represent links).

Screen shot attached.

Attachments (1)

Screen Shot 2016-01-06 at 4.56.00 PM.png (174.1 KB) - added by paulschreiber 9 years ago.

Download all attachments as: .zip

Change History (6)

#1 @helen
9 years ago

Was that created in Google Docs or was that copied from something like Word? If you download that doc as HTML you'll see all the cruft that's there.

#2 @paulschreiber
9 years ago

This was originally created in Word (on Windows). I received the source .docx, and uploaded it to Google Docs. Copying from _that_ version didn't reproduce the problem.

#3 @paulschreiber
9 years ago

We ran in to this problem again. This time, the document originated from Google docs and was never a Word doc. Let me know if having another example document will help.

#4 @paulschreiber
8 years ago

A colleague at Google filed a bug on Google docs' malformed HTML.

#5 @sabernhardt
3 years ago

  • Resolution set to reported-upstream
  • Status changed from new to closed

@paulschreiber I'm closing the ticket because it's a Google Docs bug. If you could post a link to that report, please do.

After exporting the Google Docs file to .docx and then using Word to save that as HTML, I can confirm the Classic Editor pastes the one-letter links copied from the document. In Google Docs, you can also see the link preview shows and disappears when moving the cursor to alternating letters.

Word HMTL exported from Google Docs:

<p class=MsoNormal style='margin-bottom:8.0pt;line-height:107%;border:none;
mso-padding-alt:31.0pt 31.0pt 31.0pt 31.0pt;mso-border-shadow:yes'><span
lang=EN style='font-family:"Calibri","sans-serif";mso-fareast-font-family:Calibri'>Blah
foo bar </span><span lang=EN><a
href="http://fivethirtyeight.com/features/how-the-golden-state-warriors-are-breaking-the-nba/"><span
style='font-family:"Calibri","sans-serif";mso-fareast-font-family:Calibri;
color:#0563C1'>this season</span></a></span><span lang=EN style='font-family:
"Calibri","sans-serif";mso-fareast-font-family:Calibri'> </span><span lang=EN><a
href="http://fivethirtyeight.com/features/how-the-golden-state-warriors-are-breaking-the-nba/"><span
style='font-family:"Calibri","sans-serif";mso-fareast-font-family:Calibri;
color:windowtext;text-decoration:none;text-underline:none'>(as of</span></a></span><span
lang=EN style='font-family:"Calibri","sans-serif";mso-fareast-font-family:Calibri'>
</span><span lang=EN><a
href="http://fivethirtyeight.com/features/how-the-golden-state-warriors-are-breaking-the-nba/"><span
style='font-family:"Calibri","sans-serif";mso-fareast-font-family:Calibri;
color:windowtext;text-decoration:none;text-underline:none'>l</span></a></span><span
lang=EN style='font-family:"Calibri","sans-serif";mso-fareast-font-family:Calibri'>a</span><span
lang=EN><a
href="http://fivethirtyeight.com/features/how-the-golden-state-warriors-are-breaking-the-nba/"><span
style='font-family:"Calibri","sans-serif";mso-fareast-font-family:Calibri;
color:windowtext;text-decoration:none;text-underline:none'>s</span></a></span><span
lang=EN style='font-family:"Calibri","sans-serif";mso-fareast-font-family:Calibri'>t</span><span
lang=EN><a
href="http://fivethirtyeight.com/features/how-the-golden-state-warriors-are-breaking-the-nba/"><span
style='font-family:"Calibri","sans-serif";mso-fareast-font-family:Calibri;
color:windowtext;text-decoration:none;text-underline:none'> </span></a></span><span
lang=EN style='font-family:"Calibri","sans-serif";mso-fareast-font-family:Calibri'>w</span><span
lang=EN><a
href="http://fivethirtyeight.com/features/how-the-golden-state-warriors-are-breaking-the-nba/"><span
style='font-family:"Calibri","sans-serif";mso-fareast-font-family:Calibri;
color:windowtext;text-decoration:none;text-underline:none'>e</span></a></span><span
lang=EN style='font-family:"Calibri","sans-serif";mso-fareast-font-family:Calibri'>e</span><span
lang=EN><a
href="http://fivethirtyeight.com/features/how-the-golden-state-warriors-are-breaking-the-nba/"><span
style='font-family:"Calibri","sans-serif";mso-fareast-font-family:Calibri;
color:windowtext;text-decoration:none;text-underline:none'>k</span></a></span><span
lang=EN style='font-family:"Calibri","sans-serif";mso-fareast-font-family:Calibri'>)</span></p>

Pasted markup in Classic Editor (the link is removed from the space, too):

Blah foo bar <a href="http://fivethirtyeight.com/features/how-the-golden-state-warriors-are-breaking-the-nba/">this season</a> <a href="http://fivethirtyeight.com/features/how-the-golden-state-warriors-are-breaking-the-nba/">(as of</a> <a href="http://fivethirtyeight.com/features/how-the-golden-state-warriors-are-breaking-the-nba/">l</a>a<a href="http://fivethirtyeight.com/features/how-the-golden-state-warriors-are-breaking-the-nba/">s</a>t w<a href="http://fivethirtyeight.com/features/how-the-golden-state-warriors-are-breaking-the-nba/">e</a>e<a href="http://fivethirtyeight.com/features/how-the-golden-state-warriors-are-breaking-the-nba/">k</a>)
Note: See TracTickets for help on using tickets.