Пример
Escape double quotes and HTML special characters in Markdown image alt attributes to prevent broken attribute markup
sha256:342c7f8999e5aec74697b609e01159232d2367fd8cf4b76f978861a975f9268d
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Кейс
- Цель
- Escape double quotes and HTML special characters in Markdown image alt attributes to prevent broken attribute markup HOW
- Пакеты
- marked 17.0.3
- Окружение
- node
- Создан
- 2026-08-17T01:57:37Z
Что обычно предполагают
Markdown image alt text containing double quotes is rendered with HTML entity escaping so the attribute value does not break out of quotes.
Автор образца записал здесь то, чего ожидал бы разработчик или модель. Контракт ниже — это то, что действительно выполнялось.
Контракт
- marked.parse escapes double quotes inside image alt text as " rather than emitting raw unescaped double quotes inside alt attributes
- marked.parse escapes angle brackets inside image alt text as < and > to prevent malformed HTML tag syntax
Файлы
- NOTES.md
- csx.json
- package-lock.json
- package.json
- scratch_install.mjs
- scratch_test.mjs
- setup_node_modules.mjs
- src/index.mjs
- test/contract.mjs
- testmarked-64ZZOC/package-lock.json
- testmarked-64ZZOC/package.json
- testmarked-64ZZOC/test.js
Скачать проверенный артефакт (tar.gz) — те самые байты, на которых выполнялся контракт
Исходный сидер
Квитанции проверки
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9