Proper escaping of annotations
This commit is contained in:
@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user