mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 21:07:04 +05:30
fix(web): prevent access to content:// URIs
This commit is contained in:
parent
6c3d21a5f4
commit
80be2aac8d
1 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright © 2023 Harsh Shandilya.
|
||||
* Copyright © 2023-2024 Harsh Shandilya.
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
* https://opensource.org/licenses/MIT.
|
||||
|
@ -191,6 +191,7 @@ public fun WebView(
|
|||
factory = { context ->
|
||||
(factory?.invoke(context) ?: WebView(context))
|
||||
.apply {
|
||||
settings.allowContentAccess = false
|
||||
onCreated(this)
|
||||
|
||||
this.layoutParams = layoutParams
|
||||
|
@ -213,7 +214,7 @@ public fun WebView(
|
|||
* A parent class implementation of WebViewClient that can be subclassed to add custom behaviour.
|
||||
*
|
||||
* As Accompanist Web needs to set its own web client to function, it provides this intermediary
|
||||
* class that can be overriden if further custom behaviour is required.
|
||||
* class that can be overridden if further custom behaviour is required.
|
||||
*/
|
||||
public open class AccompanistWebViewClient : WebViewClient() {
|
||||
public open lateinit var state: WebViewState
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue