diff --git a/templates/index.html b/templates/index.html index cb9afdd..bc2b34d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1651,6 +1651,13 @@ minute: '2-digit' }); }; + // Декодируем Unicode строки + const decodeUnicode = (str) => { + if (!str) return str; + return str.replace(/\\u[\dA-F]{4}/gi, (match) => { + return String.fromCharCode(parseInt(match.replace(/\\u/g, ''), 16)); + }); + }; // Загружаем связанные события const linkedEvents = await fetch(`${PREFIX}/api/posts/${postId}/linked_events`) .then(response => response.json()) @@ -1719,22 +1726,22 @@ Информация об опросе
-
- -
${post.poll_question || 'Не указан'}
+
+ +
${post.poll_question || 'Не указан'}
-
- -
${post.poll_options || 'Не указаны'}
+
+ +
${decodeUnicode(post.poll_options) || 'Не указаны'}
- -
${post.poll_multiple ? 'Да' : 'Нет'}
+ +
${post.poll_multiple ? 'Да' : 'Нет'}
- -
${formatDate(post.poll_end_date)}
+ +
${formatDate(post.poll_end_date)}
@@ -1744,8 +1751,8 @@
Результаты опроса в Telegram
-
-
${post.tg_poll_results}
+
+
${post.tg_poll_results}
` : ''} ${post.marks && post.marks.length > 0 ? ` @@ -1753,9 +1760,9 @@
Подписки (${post.marks.length})
-
+
- +
@@ -1783,11 +1790,11 @@
Связанные события (${linkedEvents.length})
-
+
-
+
${linkedEvents.map(event => ` - ${event.name || `Событие ${event.id}`}
Имя пользователя