Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Поле для комментариев к главам не валидирует для html тегов #1625

Open
Sh3rlock-git opened this issue May 28, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Sh3rlock-git
Copy link

Summary

Отсутствует валидация для html элементов в поле ввода текста комментариев к главам.

Test data

<table>
  <tr>
    <th>name1</th>
    <th>name2</th>
    <th>name3</th>
  </tr>
  <tr>
    <td>row1</td>
    <td>row2</td>
    <td>row3</td>
  </tr>
  <tr>
    <td>value1</td>
    <td>value2</td>
    <td>value3</td>
  </tr>
</table>

Reproduction steps

1. Авторизоваться в учетной записи
2. Открыть страницу с любой главой, например https://sicp.hexlet.io/ru/chapters/1
3. В поле ввода текста ввести таблицу
4. Нажать на кнопку Отправить

Expected result

Поле валидирует, появляется сообщение о недопустимых символах. Либо, таблица отправляется текстом, теги экранируются.

Actual result

Поле не валидирует на html разметку. Теги не экранируются. В комментарии отправляется таблица.
hexlet_scip_comment_field_no_html_validate

Environment
Windows 10 Pro
Yandex.Browser 24.4.3.1086 (64-bit)

Browsers

No response

OS

No response

@Sh3rlock-git Sh3rlock-git added the bug Something isn't working label May 28, 2024
@fey
Copy link
Collaborator

fey commented May 28, 2024

@Sh3rlock-git в этом поле используется парсинг markdown, который может использовать и html. Можете проверить опастые теги, типа script?

@Sh3rlock-git
Copy link
Author

@fey Можете проверить опастые теги, типа script?
Валидации нет на вот такой алерт <script>alert("123")</script>
hexlet_scip_comment_field_script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants