Skip to content

Commit 611f1ff

Browse files
committed
fix(Shared - Sanitize Sharing Links): Do not sanitize non-URL text
1 parent 60b4b51 commit 611f1ff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/main/java/io/github/chsbuffer/revancedxposed/shared/misc/privacy/SanitizeSharingLinksPatch.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ import io.github.chsbuffer.revancedxposed.shared.misc.settings.preference.Switch
1414

1515
fun BaseHook.SanitizeSharingLinks(
1616
preferenceScreen: BasePreferenceScreen.Screen,
17-
replaceMusicLinksWithYouTube: Boolean = false) {
17+
replaceMusicLinksWithYouTube: Boolean = false
18+
) {
1819

1920
val sanitizePreference = SwitchPreference("revanced_sanitize_sharing_links")
2021

@@ -37,6 +38,7 @@ fun BaseHook.SanitizeSharingLinks(
3738
val sanitizeArg1 = object : XC_MethodHook() {
3839
override fun beforeHookedMethod(param: MethodHookParam) {
3940
val url = param.args[1] as? String ?: return
41+
if (!url.contains("://")) return
4042
param.args[1] = SanitizeSharingLinksPatch.sanitize(url)
4143
}
4244
}

0 commit comments

Comments
 (0)