Replace obsoleted escape() with encodeURIComponent()

This fixes various UTF-8 issues, mostly related to description field: escape() doesn't handle UTF-8 (or non-ASCII characters to be precise) properly, so it gets encoded incorrectly. As a result ProcessPageEditImageSelect.module will in some cases (such as when umlauts are present) discard whole description text.

Since escape() has been obsoleted in JavaScript 1.5+ (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions#escape_and_unescape_functions(Obsoleted_above_JavaScript_1.5) for details) it makes sense to remove it from link encoding too, though issues there should be pretty rare.