Skip to content

Commit

Permalink
Merge pull request #604 from Xaekai/phoning.it.in
Browse files Browse the repository at this point in the history
Prevent rendering of <iframes> and <objects> in the error message …
  • Loading branch information
calzoneman authored Jul 26, 2016
2 parents 71c5fe2 + 285dab9 commit 6aebe82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion www/js/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
5 changes: 3 additions & 2 deletions www/js/util.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function makeAlert(title, text, klass) {
function makeAlert(title, text, klass, textOnly) {
if(!klass) {
klass = "alert-info";
}
Expand All @@ -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;")
Expand Down

0 comments on commit 6aebe82

Please sign in to comment.