Skip to content

Commit

Permalink
Fixed notifications titles not html escaped (fixes #1272)
Browse files Browse the repository at this point in the history
  • Loading branch information
w00fz committed Mar 10, 2018
1 parent 5148231 commit 7477ab6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

1. [](#bugfix)
* Automatically redirect to new `admin_route` after changing it [#1371](https://github.com/getgrav/grav-plugin-admin/issues/1371)
* Added shortcut in Editor for links: CTRL+K / CMD+K [#1279](https://github.com/getgrav/grav-plugin-admin/issues/1279)
* Fixed mediapicker field in lists [#1369](https://github.com/getgrav/grav-plugin-admin/issues/1369)
* Fixed notifications titles not html escaped [#1272](https://github.com/getgrav/grav-plugin-admin/issues/1272)

# v1.7.0
## 03/09/2018
Expand Down
4 changes: 3 additions & 1 deletion themes/grav/app/updates/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ class Notifications {
}

if (notification.link) {
const title = document.createElement('div');
title.innerHTML = notification.message;
content.append(`
<li class="single-notification ${hidden}">
<span class="badge alert ${notification.type}">${notification.intro_text}</span>
<a target="_blank" href="${notification.link}" title="${notification.message}">${notification.message}</a>
<a target="_blank" href="${notification.link}" title="${(title.textContent || title.innerText || '')}">${notification.message}</a>
</li>
`);
} else {
Expand Down
Loading

0 comments on commit 7477ab6

Please sign in to comment.