noahcoad / google-spell-check

Uses Google Search spelling magic to fix words or phrases for Sublime Text.
121 stars 18 forks source link

Replaces highlighted text with Javascript #19

Open Ezard opened 9 years ago

Ezard commented 9 years ago

Worked on some text the first time, then for every attempt after that, the highlighted text was replaced with a large amount of Javascript code

jCrip commented 9 years ago

Same thing happen here, sublime text 3, mac os 10.10

danparker92 commented 9 years ago

Same here :(

sudopeople commented 9 years ago

From the README.md:

BTW, this uses a standard Google search page results instead of the Google API. This is nice in that an API key isn't required, but isn't 100% officially supported, so Google changing their URL schema could break the plugin.

:disappointed:

ghost commented 9 years ago

Yup, I also have javascript on some of my corrections :disappointed:

TimothyGu commented 9 years ago

This is the same issue as #18.

peterorum commented 9 years ago

Ditto. Sublime3, Yosemite.

jixunmoe commented 9 years ago

Google embeds language file inside the webpage, which has made the Regex in google-spell-check.py#L29 matching the wrong content.

Simply stick a > in front of the regex to workaround this problem.

My quick and dirty fix:

  1. Unzip Google Spell Check.sublime-package
  2. Remove any *.pyc file.
  3. Open google-spell-check.py
  4. Fix the Regex, ... search (r'>( ...
  5. Zip everything
  6. Rename & replace Google Spell Check.sublime-package.
  7. Restart sublime text.
codepuncher commented 9 years ago

@JixunMoe Brilliant, thanks for that 'dirty' fix.

Doggie52 commented 9 years ago

I've fixed this in pull #21.

ricardozea commented 9 years ago

Not sure if the fix was merged or not, but I just installed this plugin and it still happening for me.

Followed @JixunMoe's steps and it worked, it doesn't inject JS anymore.

Doggie52 commented 9 years ago

@ricardozea it hasn't been merged yet, waiting to hear back from @noahcoad .

bobrocke commented 9 years ago

It's been quite some time. Has @noahcoad abandoned this very useful package?