catch exceptions when setting HTML
thanks to Alicia for the original solution:
dee4c98e9b
This commit is contained in:
parent
13b331fb0a
commit
db5d23d9dc
@ -9,7 +9,11 @@ function _updateQA(html, fadeTime, onupdate, onshown) {
|
|||||||
var qa = $("#qa");
|
var qa = $("#qa");
|
||||||
qa.fadeTo(fadeTime, 0, function() {
|
qa.fadeTo(fadeTime, 0, function() {
|
||||||
// update text
|
// update text
|
||||||
qa.html(html);
|
try {
|
||||||
|
qa.html(html);
|
||||||
|
} catch(err) {
|
||||||
|
qa.text("Invalid HTML on card: "+err);
|
||||||
|
}
|
||||||
_removeStylingFromMathjaxCloze();
|
_removeStylingFromMathjaxCloze();
|
||||||
onupdate(qa);
|
onupdate(qa);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user