mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Proper escaping of annotations
This commit is contained in:
parent
ffd7bcf568
commit
a4e6b00d05
1 changed files with 5 additions and 1 deletions
|
|
@ -319,7 +319,11 @@ class WebReaderViewModel @Inject constructor(
|
|||
}
|
||||
|
||||
fun saveAnnotation(annotation: String) {
|
||||
val script = "var event = new Event('saveAnnotation');event.annotation = '$annotation';document.dispatchEvent(event);"
|
||||
val jsonAnnotation = Gson().toJson(annotation)
|
||||
val script = "var event = new Event('saveAnnotation');event.annotation = $jsonAnnotation;document.dispatchEvent(event);"
|
||||
|
||||
Log.d("loggo", script)
|
||||
|
||||
enqueueScript(script)
|
||||
cancelAnnotationEdit()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue