Skip to content

Commit

Permalink
Merge pull request #8292 from wordpress-mobile/issue/8289_add_wordpre…
Browse files Browse the repository at this point in the history
…ss_com_prefix_in_jetpack_web_client

Add wordpress.com prefix after encoding the URL
  • Loading branch information
theck13 authored Sep 10, 2018
2 parents e97d625 + b1a6334 commit 909cdf3
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,11 @@ private void extractRedirect(String stringUrl) throws UnsupportedEncodingExcepti
} else {
redirectUrl = stringUrl.substring(from);
}
if (redirectUrl.startsWith(JETPACK_PATH)) {
redirectUrl = WORDPRESS_COM_PREFIX + redirectUrl;
String decodedUrl = URLDecoder.decode(redirectUrl, WPWebViewActivity.ENCODING_UTF8);
if (decodedUrl.startsWith(JETPACK_PATH)) {
decodedUrl = WORDPRESS_COM_PREFIX + decodedUrl;
}
mRedirectPage = URLDecoder.decode(redirectUrl, WPWebViewActivity.ENCODING_UTF8);
mRedirectPage = decodedUrl;
}

String getRedirectPage() {
Expand Down

0 comments on commit 909cdf3

Please sign in to comment.