Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strange Message when Pasting Text

I have no idea why this happened, but I am no longer able to copy text on my website (in Wordpress), kinda. I can paste text, but not copy text. And I can go to any other website and copy and paste text, but just not on my own. Both methods of copying (right click copy or control + C on windows) does not work on my website. But anyways, this problem applies only within text fields, like the style editor, header editor, the "quickpress" text field on the dashboard and even on the search field of my website. So I tried the following to fix this issue:

1) Disable my keyboard driver and restart my computer

2) Uninstall and reinstall my internet browser - Google Chrome

None of the above worked. But just recently, I I was able to copy and paste <script> text bit in my header.php file. I couldn't copy any other text but this and a few other snippets of code... which is very weird. But anyways, here is a code/text I copied and also what I get once I paste the code:

Original text that I copied:

<script src="http://code.jquery.com/jquery-1.9.0-min.js" type="text/javascript"></script>

Text I get when I paste original above text:

See more at: http://www.mywebsite.com/wp-admin/theme-editor.php?file=header.php&theme=mytheme2%2Fthemez2#sthash.WVvNmB7H.dpuf

Could this be a potential hacker or intruder into my website? I can't see any other explanation for this very strange error at this point. If anyone could help fix the copy and paste abilities for my website or come up with an explanation to this odd problem, it would really mean a lot.

Update:

This problem only persists in Google Chrome and Safari... not Mozilla or IE. And I stripped all of my java code and the problem still remains Hope that helps.

like image 822
Dyck Avatar asked Feb 26 '13 21:02

Dyck


2 Answers

I work on thehollywoodreporter.com. Our editors could no longer use the Drupal 6 CMS because of this sharethis change. When they tried to copy from one field to another in the cms, it would take the string and turn it into:

See more at: <text pasted>&action=edit#sthash.mOyzIP9P.dpuf

I seriously thought our site had been hacked for like 10 minutes. Luckily, the dev community started posting about it, and pointed out it was the new CopyNShare feature sharethis added. I commented out the sharethis code, so our editors could resume publishing, and we got on the phone with our sharethis contact, and they had us change this:

  <script type="text/javascript">var __st_loadLate=true;</script><script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>

to

<script type="text/javascript">var __st_loadLate=true;</script><script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>

<script type="text/javascript">stLight.options({publisher: "<your publisher key>", doNotHash:false, doNotCopy:true,hashAddressBar:false});</script>

Apparently, they made a change to their code so that you MUST add 'doNotCopy: true' in order for it NOT to add this hash when you cut and paste within your site! This is their new "product" CopyNShare.

I told them "I don’t think it was popular move to roll out this feature as a new default like this. I seriously thought our site had been hacked for 10-15 minutes. Not fun."

They replied: "I definitely understand your concern, as we share the same concerns on the pub services team. We will be doing a "postmortem" of sorts to ensure we change this process in the future when new product features are rolled out."

like image 81
Nate Avatar answered Oct 04 '22 15:10

Nate


As @Punit Pandey suggested, the ShareThis plugin started doing this today (February 27th 2013) without warning. You can disable this new functionality by adding the following JavaScript after the ShareThis-code has initialized:

stLight.options({doNotCopy:true});

The description for this new functionality can be found here: ShareThis CopyNShare Settings

like image 25
JesperB Avatar answered Oct 04 '22 16:10

JesperB