Merge pull request #604 from Xaekai/phoning.it.in

Prevent rendering of <iframes> and <objects> in the error message …
This commit is contained in:
Calvin Montgomery 2016-07-25 20:24:13 -07:00 committed by GitHub
commit 6aebe82298
2 changed files with 4 additions and 3 deletions

View File

@ -394,7 +394,7 @@ function queue(pos, src) {
if (data.id == null || data.type == null) {
makeAlert("Error", "Failed to parse link " + link +
". Please check that it is correct",
"alert-danger")
"alert-danger", true)
.insertAfter($("#addfromurl"));
} else {
emitQueue.push({

View File

@ -1,4 +1,4 @@
function makeAlert(title, text, klass) {
function makeAlert(title, text, klass, textOnly) {
if(!klass) {
klass = "alert-info";
}
@ -7,8 +7,9 @@ function makeAlert(title, text, klass) {
var al = $("<div/>").addClass("alert")
.addClass(klass)
.html(text)
.appendTo(wrap);
textOnly ? al.text(text) : al.html(text) ;
$("<br/>").prependTo(al);
$("<strong/>").text(title).prependTo(al);
$("<button/>").addClass("close pull-right").html("&times;")