mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Escape html in tags
This commit is contained in:
parent
dd79544593
commit
9fa0b4f5b2
2 changed files with 8 additions and 4 deletions
|
@ -1257,9 +1257,13 @@ function renderTags(page, item) {
|
|||
tags = [];
|
||||
}
|
||||
|
||||
for (let i = 0, length = tags.length; i < length; i++) {
|
||||
tagElements.push('<a href="#/search.html?query=' + encodeURIComponent(tags[i]) + '" class="button-link emby-button" is="emby-linkbutton">' + tags[i] + '</a>');
|
||||
}
|
||||
tags.forEach(tag => {
|
||||
tagElements.push(
|
||||
`<a href="#/search.html?query=${encodeURIComponent(tag)}" class="button-link emby-button" is="emby-linkbutton">`
|
||||
+ escapeHtml(tag)
|
||||
+ '</a>'
|
||||
);
|
||||
});
|
||||
|
||||
if (tagElements.length) {
|
||||
itemTags.innerHTML = globalize.translate('TagsValue', tagElements.join(', '));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue