Skip to content

Commit

Permalink
fix: Add trg parameter to Netflix sanitizer
Browse files Browse the repository at this point in the history
  • Loading branch information
svenjacobs committed Sep 29, 2023
1 parent fec773c commit 034b212
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import com.svenjacobs.app.leon.core.domain.sanitizer.Sanitizer
import com.svenjacobs.app.leon.core.domain.sanitizer.SanitizerId

class NetflixSanitizer : RegexSanitizer(
regex = RegexFactory.ofParameter("s|t|trkid|vlang|clip|netflixsource|fromApp"),
regex = RegexFactory.ofParameter("s|t|trkid|vlang|clip|netflixsource|fromApp|trg"),
) {

override val id = SanitizerId("netflix")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ class NetflixSanitizerTest : WordSpec(

"remove various Netflix parameters" {
val result = sanitizer(
"https://www.netflix.com/de/title/81040344?s=a&trkid=13747225&t=more&vlang=de&clip=81499054",
"https://www.netflix.com/de/title/81040344?s=a&trkid=13747225&t=more&vl" +
"ang=de&clip=81499054&trg=trg",
)

result shouldBe "https://www.netflix.com/de/title/81040344"
Expand Down

0 comments on commit 034b212

Please sign in to comment.