Wikia/app — pull request #5702 by jsutterfield (2014-12-10 03:18:34+00:00)
Title: UC-152 Avatars cannot be uploaded on some wikias

There were 2 problems here:

First, in aim.js, the code was interpreting a response from the server from UserProfilePage::onSubmitUsersAvatar as html, when it's actually json. This was HTML escaping ampersands into ```&```. Using textContent to get the raw value fixes that.

Second, The upload error presents itself on foreign language wikias which are using vignette. This is because vignette appends ```path-prefix=``` to the end of thumbnails on foreign language wikias and we were manually constructing a query string using that thumbnail to be sent to the server. Letting jquery construct that query string fixes that.