Skip to content

Commit

Permalink
Fix handling of URL-encoded ampersands in Uclick JPZ.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpd236 committed Jun 23, 2023
1 parent 66a5716 commit 7aaeda4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ class UclickJpz(
/** Try URL decoding the text, but leave it untouched if it contains invalid sequences. */
private fun tryDecodeUrl(text: String): String {
return try {
Encodings.decodeUrl(text)
// Manually decode ampersands so they can be properly escaped.
Encodings.decodeUrl(text.replace("%26", "&"))
} catch (e: Throwable) {
text
}
Expand Down

0 comments on commit 7aaeda4

Please sign in to comment.