Fix issue where unique selector is invalid when target element contains a class with bracket characters
Fix typo when replacing whitespace for dots
Add id selector escaping
Refactor escaping function to include all unsupported characters
Fix issue where element.id could return an invalid value.
In some cases, e.g. <div id='foo'><input name="id"></div>, div.id would return <input name="id"> instead of 'foo'
Merge pull request #1 from youbbi/fix/escape-brackets

Fix/escape brackets