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 = [];
|
tags = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0, length = tags.length; i < length; i++) {
|
tags.forEach(tag => {
|
||||||
tagElements.push('<a href="#/search.html?query=' + encodeURIComponent(tags[i]) + '" class="button-link emby-button" is="emby-linkbutton">' + tags[i] + '</a>');
|
tagElements.push(
|
||||||
}
|
`<a href="#/search.html?query=${encodeURIComponent(tag)}" class="button-link emby-button" is="emby-linkbutton">`
|
||||||
|
+ escapeHtml(tag)
|
||||||
|
+ '</a>'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
if (tagElements.length) {
|
if (tagElements.length) {
|
||||||
itemTags.innerHTML = globalize.translate('TagsValue', tagElements.join(', '));
|
itemTags.innerHTML = globalize.translate('TagsValue', tagElements.join(', '));
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
import classNames from 'classnames';
|
||||||
import React, { type DetailedHTMLProps, type InputHTMLAttributes, type FC, useState, useCallback } from 'react';
|
import React, { type DetailedHTMLProps, type InputHTMLAttributes, type FC, useState, useCallback } from 'react';
|
||||||
|
|
||||||
import './emby-input.scss';
|
import './emby-input.scss';
|
||||||
import classNames from 'classnames';
|
|
||||||
|
|
||||||
interface InputProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
interface InputProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
||||||
id: string,
|
id: string,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue