add logic so that valid a tags are not stripped by WordFilter
incorporate end/footnote anchor fix with toc fix
merged in changes from upstream master
added tests for changed link handling in paste word filter
Update EditorManager.js

use document.currentScript if available 

we use a js file compressor, so user dowload only one compacted js file with all script needed (there is many raisons for doing that)
for tinymce the path is wrong because the regex not match the path and is not the real path of script.

so in our compressor each script is preceded by this declaration:
` var src = "real/path/to/script.js";
( typeof document.currentScript == 'string' ) ? document.currentScript.src = src : document.currentScript = { 'src' : src }; `

in this case document.currentScript is always set on all browser and we have no issue.

https://developer.mozilla.org/en/docs/Web/API/document.currentScript

i have read this code and know this can be fixed with preInit.baseURL, but document.currentScript is a more efficent way to get base Url.

Regards
Fixed bug where the charmap plugin wouldn't properly insert non breaking space characters when selected.
Fixed bug where pasting from Excel 2011 on Mac didn't produce a proper table when using the paste plugin.
Fixed some drag/drop related bugs.
Fixed a few eslint issues and switched saucelabs console coloring to chalk.
Fixed edge case when drag/dropping images on Mac OS X Safari.
Fixed bug where editors couldn't be re-initialized if they where externally destroyed.
URI.toAbsolute used incomplete same-origin logic.

There's a new method on URI that does more complete same-origin logic,
and toAbsolute now uses that.
Reformatted isSameOrigin patch, added unit tests and credits to changelog.txt
Added input as a native event to UI Control.js
Merge pull request #363 from mkdgs/patch-1

set baseURL with document.currentScript if available
Reworked the currentScript patch and added details to changelog.txt
Fixed bug where inline editors would produce a range index exception when clicking on buttons like bold.
Merge pull request #362 from nschoenholtz/stop-removing-valid-a-tags

Add logic so that valid a tags are not stripped by WordFilter
Fixed issue with the paste_webkit_styles option so is disabled by default since it might produce a lot of extra styles.
Fixed bug where the preview plugin wouldn't properly handle non encoded upper UTF-8 characters.