Skip to content

Commit

Permalink
(Change:toastr) 保留 <br/>
Browse files Browse the repository at this point in the history
  • Loading branch information
Medicean committed Apr 12, 2019
1 parent 37f871b commit b7af546
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions static/libs/toastr/toastr.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,19 +235,23 @@

if (map.title) {
$titleElement.append(String(map.title)
.replace(/<br\/>/g, "###asbr###")
.replace(/&/g, "&amp;")
.replace(/>/g, "&gt;")
.replace(/</g, "&lt;")
.replace(/"/g, "&quot;")).addClass(options.titleClass);
.replace(/"/g, "&quot;")
.replace(/###asbr###/g, "<br/>")).addClass(options.titleClass);
$toastElement.append($titleElement);
}

if (map.message) {
$messageElement.append(String(map.message)
.replace(/<br\/>/g, "###asbr###")
.replace(/&/g, "&amp;")
.replace(/>/g, "&gt;")
.replace(/</g, "&lt;")
.replace(/"/g, "&quot;")).addClass(options.messageClass);
.replace(/"/g, "&quot;")
.replace(/###asbr###/g, "<br/>")).addClass(options.messageClass);
$toastElement.append($messageElement);
}

Expand Down

0 comments on commit b7af546

Please sign in to comment.