diff options
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/facebook/FbUrlFormatter.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/facebook/FbUrlFormatter.kt | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbUrlFormatter.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbUrlFormatter.kt index f21c03e9..add35154 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbUrlFormatter.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbUrlFormatter.kt @@ -43,6 +43,7 @@ class FbUrlFormatter(url: String) { L.e(e) { "Failed url formatting" } return url } + cleanedUrl = cleanedUrl.replace("&", "&") if (changed && !cleanedUrl.contains("?")) //ensure we aren't missing '?' cleanedUrl = cleanedUrl.replaceFirst("&", "?") val qm = cleanedUrl.indexOf("?") @@ -54,8 +55,6 @@ class FbUrlFormatter(url: String) { cleanedUrl = cleanedUrl.substring(0, qm) } discardableQueries.forEach { queries.remove(it) } - //final cleanup - misc.forEach { (k, v) -> cleanedUrl = cleanedUrl.replace(k, v, true) } if (cleanedUrl.startsWith("/")) cleanedUrl = FB_URL_BASE + cleanedUrl.substring(1) cleanedUrl = cleanedUrl.replaceFirst(".facebook.com//", ".facebook.com/") //sometimes we are given a bad url L.v { "Formatted url from $url to $cleanedUrl" } @@ -101,8 +100,6 @@ class FbUrlFormatter(url: String) { VIDEO_REDIRECT ) - val misc = arrayOf("&" to "&") - val discardableQueries = arrayOf("ref", "refid", "acontext", "SharedWith") val converter = listOf( |