aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-12-29 16:51:56 -0800
committerAllan Wang <me@allanwang.ca>2019-12-29 16:51:56 -0800
commit03787c95cbdd71c6a3e3c0e4dc2ec13adaa79620 (patch)
tree950031d4c6b54bd283f51941e4472f3e5ad0071b /app
parent0828e8fceec86333f81d5b8cf204184ecc58f0ef (diff)
downloadfrost-03787c95cbdd71c6a3e3c0e4dc2ec13adaa79620.tar.gz
frost-03787c95cbdd71c6a3e3c0e4dc2ec13adaa79620.tar.bz2
frost-03787c95cbdd71c6a3e3c0e4dc2ec13adaa79620.zip
Blacklist h query
Diffstat (limited to 'app')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/facebook/FbUrlFormatter.kt1
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt7
2 files changed, 8 insertions, 0 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 76e58465..5ae6856b 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbUrlFormatter.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbUrlFormatter.kt
@@ -144,6 +144,7 @@ class FbUrlFormatter(url: String) {
"refid",
"SharedWith",
"fbclid",
+ "h",
"_ft_",
"_tn_",
"_xt_",
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt
index 27dd9af9..799b11a9 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt
@@ -156,6 +156,13 @@ class FbUrlTest {
assertFbFormat(expected, url)
}
+ @Test
+ fun queryH() {
+ val url = "${FB_URL_BASE}sample/?h=asdfasdf"
+ val expected = "${FB_URL_BASE}sample/"
+ assertFbFormat(expected, url)
+ }
+
// @Test
// fun viewFullImageIndirect() {
// val urlBase = "photo/view_full_size/?fbid=1234&ref_component=mbasic_photo_permalink&ref_page=%2Fwap%2Fphoto.php&refid=13&_ft_=qid.1234%3Amf_story_key.1234%3Atop_level_post_id"