1
0
Fork 0
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:
Bill Thornton 2024-02-13 17:10:48 -05:00
parent dd79544593
commit 9fa0b4f5b2
2 changed files with 8 additions and 4 deletions

View file

@ -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(', '));

View file

@ -1,7 +1,7 @@
import classNames from 'classnames';
import React, { type DetailedHTMLProps, type InputHTMLAttributes, type FC, useState, useCallback } from 'react';
import './emby-input.scss';
import classNames from 'classnames';
interface InputProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
id: string,