refactor the large if-elif-else used for searching
added search-hook for plugins using "search" scope
moved loading of plugins to initialization
Escape deck characters as necessary in suggested deck export path
need to strip trailing <br /> when saving fields
experimental type answer refactor

- when answer not correct, show both the given and correct string in separate
  markup. we use red/green for the given string to indicate what was correct,
  but we use grey rather than red on the correct string to indicate what was
  missing, as red is misleading
- colours can now be customized in css with .typeGood, .typeBad and
  .typeMissing
- answer now shown in monospace so given/correct lines up; can be customized
  with code#typeans
- do away with 'correct answer was' text that people didn't like
a hack to ensure hr falls before answer comparsion
add real example to card layout, and move hr like during review
turn off autojunking

seems to give better results on long passages, eg
https://anki.tenderapp.com/discussions/ankidesktop/1108-the-typing-diffs-are-sometimes-less-than-helpful
Add editFocusGained hook
Merge pull request #30 from hoelzro/master

Add editFocusGained hook
Merge pull request #29 from hans/patch/618

default to deckname.apkg on single deck export (#618)
more exporting fixes

- make sure we default to last saved export location
- make sure we filter out backslash
- use fname not initial_path, because we're not passing in a path
fix float issue in stats

[Beta Testing #23]
strip all non-src elements when copying&pasting images between fields
we shouldn't quote when adding media

- utf8/unicode is valid in the src string, provided we escape quotes
- and we escape when setting fields in the editor, leading to double escaping
  if we do that
- and we strip quotes when adding
more media regexp fixes

- split quoted and unquoted image case into separate regexps, since we can't
  include a group reference inside a character set
- disallow spaces in the non-quoted case
- this should fix matching on images with other attributes again
fix upgrading of latex references
remove broken accelerator from preview button; add tooltip
treat preview window as a separate main window